Preliminary GCC 3.3 LFS

Greg Schafer gschafer at zip.com.au
Thu May 15 06:02:47 PDT 2003


On Wed, May 14, 2003 at 08:46:40PM -0400, Zack Winkles wrote:
> Hey everyone,
> 
> Since it may be anywhere from days to weeks until GCC 3.3 is integrated
> into the book, I figured I'd post my local copy of the book so that you
> people could bang away on it and break it as best you can. Testing is
> always a good thing. The book is located here:
> 	http://linuxfromscratch.org/~winkie/book/
> And the patches for it that aren't available elsewhere are here:
> 	http://linuxfromscratch.org/~winkie/downloads/book/
> 
> Let's get some testbuilds in on this thing. Any errors that you have
> that are obviously due to something that I broke should be reported to
> me, otherwise follow the standard procedure.

Zack, I've been hitting a build failure which I haven't been able to figure
out until now.

I always compile my glibc's with -march=i686 and that seems to be the
trigger for it (I also use --enable-kernel=xxx but that's another story).

The fail.log is attached.

For the record, here are the relevant URL's:-

http://gcc.gnu.org/ml/gcc/2003-01/msg00396.html

http://sources.redhat.com/ml/bug-glibc/2003-01/msg00016.html

What I don't understand is why I haven't hit this with gcc-3.2.x. Anuway,
the rock linux guys have solved the problem and I can confirm that the
attached patch fixes it for me (taken straight from their source archive).

If anyone wants the ugly detail on why the assembler was choking, I
can provide it on request. The only good thing to come out of it was at
least I learnt a bit more about GNU as :-)

Greg
-------------- next part --------------
gcc -B/stage1/bin/ ../sysdeps/unix/sysv/linux/sigprocmask.c -c -std=gnu99 -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -pipe   -fPIC    -I../include -I. -I/mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal -I.. -I../libio  -I/mnt/hdb6/home/gws/scratch/glibc-build-ch5 -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /stage1/lib/gcc-lib/i686-pc-linux-gnu/3.3/include -isystem /stage1/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED     -o /mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal/sigprocmask.os
(echo '#include <sysdep.h>'; \
 echo 'PSEUDO (__kill, kill, 2)'; \
 echo '	ret'; \
 echo 'PSEUDO_END(__kill)'; \
 echo 'libc_hidden_def (__kill)'; \
 echo 'weak_alias (__kill, kill)'; \
 echo 'libc_hidden_weak (kill)'; \
) | gcc -B/stage1/bin/ -c  -I../include -I. -I/mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal -I.. -I../libio  -I/mnt/hdb6/home/gws/scratch/glibc-build-ch5 -I../sysdeps/i386/elf -I../linuxthreads/sysdeps/unix/sysv/linux/i386 -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/i386/i686 -I../linuxthreads/sysdeps/i386 -I../sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i686/fpu -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../sysdeps/i386/fpu -I../sysdeps/i386 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/ldbl-96 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /stage1/lib/gcc-lib/i686-pc-linux-gnu/3.3/include -isystem /stage1/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC -DSHARED     -DASSEMBLER  -DGAS_SYNTAX  -x assembler-with-cpp -o /mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal/kill.os -
<stdin>: Assembler messages:
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Error: unrecognized symbol type ""
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Error: expected comma after name `' in .size directive
<stdin>:4: Warning: rest of line ignored; first ignored character is `1'
<stdin>:4: Error: junk `.get_pc_thunk.bx' after expression
make[2]: *** [/mnt/hdb6/home/gws/scratch/glibc-build-ch5/signal/kill.os] Error 1
make[2]: Leaving directory `/mnt/hdb6/home/gws/scratch/glibc-2.3.2/signal'
make[1]: *** [signal/subdir_lib] Error 2
make[1]: Leaving directory `/mnt/hdb6/home/gws/scratch/glibc-2.3.2'
make: *** [all] Error 2
-------------- next part --------------
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
# 
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
# 
# ROCK Linux: rock-src/package/base/glibc/pentium23_fix.patch
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
# 
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
# 
# --- ROCK-COPYRIGHT-NOTE-END ---

--- ./sysdeps/unix/sysv/linux/i386/sysdep.h.orig	2003-01-08 12:38:31.000000000 +0100
+++ ./sysdeps/unix/sysv/linux/i386/sysdep.h	2003-01-08 12:41:09.000000000 +0100
@@ -35,6 +35,12 @@
 
 #ifdef __ASSEMBLER__
 
+/* __i686 is used in assembler code below as normal text within a statement.
+   When optimizing for pentium2 or pentium3, gcc defines __i686 as cpp macro
+   which destroys the code below. Glibc is only using the cpp macro __i686__,
+   so we can savely undefine __i686 here. - Clifford Wolf */
+#undef __i686
+
 /* Linux uses a negative return value to indicate syscall errors,
    unlike most Unices, which use the condition codes' carry flag.
 


More information about the lfs-dev mailing list