This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: glibc-2.3.2: cmov generated even for --target=i486-pc-linux-gnu
- From: Denis Vlasenko <vda at port dot imtp dot ilyichevsk dot odessa dot ua>
- To: libc-alpha at sources dot redhat dot com
- Date: Tue, 21 Sep 2004 15:15:13 +0300
- Subject: Re: glibc-2.3.2: cmov generated even for --target=i486-pc-linux-gnu
- References: <200409211234.28647.vda@port.imtp.ilyichevsk.odessa.ua>
On Tuesday 21 September 2004 12:34, Denis Vlasenko wrote:
> Yay. I was SIGILLed on Pentium classic! 8(
>
> I had saved entire configure and make logs when I built 2.3.2,
> Today they will be very useful.
>
> ../configure \
> --prefix=/usr \
> --exec-prefix=$STATIC \
> --bindir=$STATIC/bin \
> --sbindir=$STATIC/sbin \
> --libexecdir=$STATIC/libexec \
> --datadir=$STATIC/share \
> --sysconfdir=/etc \
> --sharedstatedir=$PERBOX/com \
> --localstatedir=$PERBOX \
> --libdir=/usr/lib \
> --includedir=$STATIC/include \
> --oldincludedir=/usr/include \
> --infodir=$STATIC/info \
> --mandir=$STATIC/man \
> \
> --with-headers=/usr/src2/$NAME/.linux-2.4.25_include \
> --enable-add-ons=linuxthreads \
> --enable-kernel=2.4.25 \
> \
> --enable-shared \
> --disable-static \
> --disable-profile \
> \
> --target=i486-pc-linux-gnu \
Adding appropriate --build= worked around this problem,
However, I don't think it's a right solution.
--target must be enough to specify target arch.
Correct me if I'm wrong.
I haven't enough time to verify that this problem still exists
in newer glibc. Sorry. If you have newer glibc compiled for [345]86,
you can do quick check for this:
find -name '*.so*' \
| while read -r file; do
if objdump -d "$file" 2>/dev/null | grep -q -F cmov; then
echo "$file: "
objdump -d "$file" | grep -F cmov
fi
done
For the sake of completeness, below are my new configure params.
Some wrestling caused by gcc-3.3.3 was needed
(sscanf is a builtin now?! hmm).
# --target=i486-pc-linux-gnu alone did not prevent it from emitting some cmovs
#
# -fno-builtin-sscanf or else gcc-3.3.3 will be very unhappy:
# stdio-common/sscanf.c
# sscanf.c:31: warning: conflicting types for built-in function `sscanf'
# sscanf.c: In function `sscanf':
# sscanf.c:37: error: `va_start' used in function with fixed args
#
CFLAGS="-O2 -fno-builtin-sscanf" \
\
../configure \
--prefix=/usr \
--exec-prefix=$STATIC \
--bindir=$STATIC/bin \
--sbindir=$STATIC/sbin \
--libexecdir=$STATIC/libexec \
--datadir=$STATIC/share \
--sysconfdir=/etc \
--sharedstatedir=$PERBOX/com \
--localstatedir=$PERBOX \
--libdir=/usr/lib \
--includedir=$STATIC/include \
--oldincludedir=/usr/include \
--infodir=$STATIC/info \
--mandir=$STATIC/man \
\
--with-headers=/usr/src2/$NAME/.linux-2.4.25_include \
--enable-add-ons=linuxthreads \
--enable-kernel=2.4.25 \
\
--enable-shared \
--disable-static \
--disable-profile \
\
--target=i486-pc-linux-gnu \
--build=i386-pc-linux-gnu \
\
2>&1 | tee !cfg.log
--
vda