View previous topic :: View next topic |
Author |
Message |
cnhnln n00b
Joined: 20 Nov 2004 Posts: 11
|
Posted: Thu Sep 07, 2006 4:09 pm Post subject: how about "CHOST=pentium4-pc-linux-gnu"? |
|
|
when i recompile gcc with "CHOST=pentium4-pc-linux-gnu" . i get...
Code: |
checking build system type... i786-pc-linux-gnu
checking host system type... i786-pc-linux-gnu
checking target system type... i786-pc-linux-gnu
|
Code: |
localhost src # gcc -v
使ç¨å
建 specsã
ç®æ ï¼pentium4-pc-linux-gnu
é
置为ï¼/var/tmp/portage/gcc-4.1.1-r1/work/gcc-4.1.1/configure --prefix=/usr --bindir=/usr/pentium4-pc-linux-gnu/gcc-bin/4.1.1 --includedir=/usr/lib/gcc/pentium4-pc-linux-gnu/4.1.1/include --datadir=/usr/share/gcc-data/pentium4-pc-linux-gnu/4.1.1 --mandir=/usr/share/gcc-data/pentium4-pc-linux-gnu/4.1.1/man --infodir=/usr/share/gcc-data/pentium4-pc-linux-gnu/4.1.1/info --with-gxx-include-dir=/usr/lib/gcc/pentium4-pc-linux-gnu/4.1.1/include/g++-v4 --host=pentium4-pc-linux-gnu --build=pentium4-pc-linux-gnu --disable-altivec --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --disable-libunwind-exceptions --disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj --enable-languages=c,c++,fortran --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
线ç¨æ¨¡åï¼posix
gcc çæ¬ 4.1.1 (Gentoo 4.1.1-r1)
localhost src #
|
Code: |
localhost src # pe
pentium4-pc-linux-gnu-c++ pentium4-pc-linux-gnu-gfortran
pentium4-pc-linux-gnu-c++-4.1.1 pentium4-pc-linux-gnu-gfortran-4.1.1
pentium4-pc-linux-gnu-cpp pentium4-pc-linux-gnu-protoize
pentium4-pc-linux-gnu-cpp-4.1.1 pentium4-pc-linux-gnu-unprotoize
pentium4-pc-linux-gnu-g++ perl
pentium4-pc-linux-gnu-g++32 perl5.8.8
pentium4-pc-linux-gnu-g++-4.1.1 perlbug
pentium4-pc-linux-gnu-gcc perlcc
pentium4-pc-linux-gnu-gcc32 perl-cleaner
pentium4-pc-linux-gnu-gcc-4.1.1 perldoc
pentium4-pc-linux-gnu-gccbug perlivp
pentium4-pc-linux-gnu-gcov
localhost src #
|
who know and talk this?
thanks
Last edited by cnhnln on Thu Sep 07, 2006 4:37 pm; edited 3 times in total |
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Thu Sep 07, 2006 4:26 pm Post subject: |
|
|
Uh... Don't do that. You can't stick arbitrary values in CHOST and expect it to work. |
|
Back to top |
|
|
Dominique_71 Veteran
Joined: 17 Aug 2005 Posts: 1877 Location: Switzerland (Romandie)
|
Posted: Thu Sep 07, 2006 4:30 pm Post subject: |
|
|
Please read this: Configuring the Compile Options
CHOST=i786-pc-linux-gnu doesn't exist. Use CHOST=i686-pc-linux-gnu and it will solve your problem.
And use safe CFLAGS and CXXFLAGS.
If not absolutely sure, change only the march=<your processor> and you will be just fine.
-fomit-frame-pointer is safe, it will speed the system a little, but does at debugging is impossible. -pipe and -O2 are safe.
All the other CFLAGS can cause some kind of troubles. That because the gentoo programmers use -pipe -O2, and all the other combinations are not tested. _________________ "Confirm You are a robot." - the singularity |
|
Back to top |
|
|
Archangel1 Veteran
Joined: 21 Apr 2004 Posts: 1212 Location: Work
|
Posted: Thu Sep 07, 2006 10:51 pm Post subject: |
|
|
Wow, you've discovered the previously unknown 786 architecture - this must be a conspiracy by Intel and GCC to keep us from getting more optimisation for our systems!!1!!one
_________________ What are you, stupid? |
|
Back to top |
|
|
Chaosite Guru
Joined: 13 Dec 2003 Posts: 540 Location: Right over here.
|
Posted: Thu Sep 07, 2006 11:08 pm Post subject: |
|
|
...
this made me say "WTF!?" out loud.
definitely another one for funroll-loops.org. |
|
Back to top |
|
|
jiangtao Tux's lil' helper
Joined: 16 Mar 2004 Posts: 80
|
Posted: Sat Sep 09, 2006 10:45 am Post subject: |
|
|
I am using CHOST="pentium4-pc-linux-gnu" && remerged gcc .....
I use it (CHOST="pentium4-pc-linux-gnu") to emerge firefox 1.5.0.6 & audacious & It seem working fine ......
But , XGL + compiz-quinnstorm can't work for me ....
No window decorations..............
gcc or compiz's bug ? |
|
Back to top |
|
|
monkey89 Guru
Joined: 08 Mar 2004 Posts: 596
|
Posted: Sat Sep 09, 2006 11:37 am Post subject: |
|
|
pentium4 is nonsense... but actually, from what I can tell, i786 may actually be a valid CHOST. Has anyone checked this out at all? Not that the optimization would probably make any difference, but it is something I've never heard of before. Wikipedia says it refers to chips based on the NetBurst architecture (P4s since 2000). |
|
Back to top |
|
|
Dominique_71 Veteran
Joined: 17 Aug 2005 Posts: 1877 Location: Switzerland (Romandie)
|
Posted: Sat Sep 09, 2006 12:35 pm Post subject: |
|
|
Wikipedia is not gentoo official documentation.
If you want a working system, you must use a valid CHOST and use the -march CLFAG to tell gcc for which processor you want the optimisation. _________________ "Confirm You are a robot." - the singularity |
|
Back to top |
|
|
cnhnln n00b
Joined: 20 Nov 2004 Posts: 11
|
Posted: Sat Sep 09, 2006 12:37 pm Post subject: |
|
|
where can i found CHOST defineï¼gcc.gnu.org or other pageï¼ |
|
Back to top |
|
|
Dominique_71 Veteran
Joined: 17 Aug 2005 Posts: 1877 Location: Switzerland (Romandie)
|
Posted: Sat Sep 09, 2006 1:05 pm Post subject: |
|
|
jiangtao wrote: | I am using CHOST="pentium4-pc-linux-gnu" && remerged gcc .....
I use it (CHOST="pentium4-pc-linux-gnu") to emerge firefox 1.5.0.6 & audacious & It seem working fine ......
But , XGL + compiz-quinnstorm can't work for me ....
No window decorations..............
gcc or compiz's bug ? |
The problem is between the chair and the keyboard in this case. One more time, read Configuring the Compile Options
Quote: | The CHOST variable declares the target build host for your system. This variable should already be set to the correct value. Do not edit it as that might break your system. If the CHOST variable does not look correct to you, you might be using the wrong stage3 tarball. |
_________________ "Confirm You are a robot." - the singularity |
|
Back to top |
|
|
Dominique_71 Veteran
Joined: 17 Aug 2005 Posts: 1877 Location: Switzerland (Romandie)
|
Posted: Sat Sep 09, 2006 1:08 pm Post subject: |
|
|
cnhnln wrote: | where can i found CHOST defineï¼gcc.gnu.org or other pageï¼ |
With x86 architecture, it is i686-pc-linux-gnu for all modern x86 processors. _________________ "Confirm You are a robot." - the singularity |
|
Back to top |
|
|
Dominique_71 Veteran
Joined: 17 Aug 2005 Posts: 1877 Location: Switzerland (Romandie)
|
Posted: Sat Sep 09, 2006 1:16 pm Post subject: |
|
|
And as I daid before, use safe CFLAGS. It is not because at a program compile that it will work as expected. Many Cflags can do worng code without even a warning. All depend of the combination of the code and the Cflags. The CFLAGS in the manual are safe, and well tested, all the other can or not work depending on which program you compile with. Generally, for the programs that need special Cflags, the ebuild and/or the sources of the program take care of it. _________________ "Confirm You are a robot." - the singularity |
|
Back to top |
|
|
jiangtao Tux's lil' helper
Joined: 16 Mar 2004 Posts: 80
|
Posted: Sat Sep 09, 2006 1:29 pm Post subject: |
|
|
It is working now .
Why not use it?
As your idea, i386 + -O0 is enough.
|
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Sat Sep 09, 2006 1:57 pm Post subject: |
|
|
jiangtao wrote: |
It is working now .
Why not use it? |
Congratulations, your system will break next time you update certain packages, and there's absolutely nothing you can do to fix it. |
|
Back to top |
|
|
jiangtao Tux's lil' helper
Joined: 16 Mar 2004 Posts: 80
|
Posted: Sat Sep 09, 2006 2:21 pm Post subject: |
|
|
ciaranm wrote: | jiangtao wrote: |
It is working now .
Why not use it? |
Congratulations, your system will break next time you update certain packages, and there's absolutely nothing you can do to fix it. |
I can use an other Linux suite to rebuild gcc.
|
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Sat Sep 09, 2006 2:29 pm Post subject: |
|
|
jiangtao wrote: | ciaranm wrote: | jiangtao wrote: |
It is working now .
Why not use it? |
Congratulations, your system will break next time you update certain packages, and there's absolutely nothing you can do to fix it. |
I can use an other Linux suite to rebuild gcc.
|
And just how do you plan to fix gcc-config and binutils-config? |
|
Back to top |
|
|
monkey89 Guru
Joined: 08 Mar 2004 Posts: 596
|
Posted: Sat Sep 09, 2006 10:13 pm Post subject: |
|
|
Dominique_71 wrote: | Wikipedia is not gentoo official documentation.
If you want a working system, you must use a valid CHOST and use the -march CLFAG to tell gcc for which processor you want the optimisation. |
Again, I'm perfectly happy with i686. I'm wondering if i786 actually is a valid CHOST - so to do further investigation I looked at the gcc source code. In gcc-4.1.1/config.sub, there is the following code:
Code: |
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
|
I know extremely little about the gcc source code, but looking at the behavior of his build, it would lead me to believe that i786 is recognized as something. Whether or not that something is the exact same as i686 or if its actually different is a question I can't really answer without looking a bit more into it. |
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Sat Sep 09, 2006 10:26 pm Post subject: |
|
|
monkey89 wrote: | Dominique_71 wrote: | Wikipedia is not gentoo official documentation.
If you want a working system, you must use a valid CHOST and use the -march CLFAG to tell gcc for which processor you want the optimisation. |
Again, I'm perfectly happy with i686. I'm wondering if i786 actually is a valid CHOST - so to do further investigation I looked at the gcc source code. In gcc-4.1.1/config.sub, there is the following code: |
Not a gcc issue. You should be looking at binutils and glibc. |
|
Back to top |
|
|
jiangtao Tux's lil' helper
Joined: 16 Mar 2004 Posts: 80
|
Posted: Sun Sep 10, 2006 3:11 am Post subject: |
|
|
ciaranm wrote: | jiangtao wrote: | ciaranm wrote: | jiangtao wrote: |
It is working now .
Why not use it? |
Congratulations, your system will break next time you update certain packages, and there's absolutely nothing you can do to fix it. |
I can use an other Linux suite to rebuild gcc.
|
And just how do you plan to fix gcc-config and binutils-config? |
Before validate It's working fine, I will not recompile the base-packages.
So,I can chroot to Gentoo, and re-emerge gcc.
If gcc doesn't work, I can follow : http://gentoo-wiki.com/HOWTO_Recover_from_%22emerge_--unmerge_gcc%22
|
|
Back to top |
|
|
jiangtao Tux's lil' helper
Joined: 16 Mar 2004 Posts: 80
|
Posted: Wed Sep 13, 2006 9:24 am Post subject: |
|
|
glibs's ebuild-file not support "pentium4-linux-pc-gnu" ,but "i786-linux-pc-gnu"...............
|
|
Back to top |
|
|
jiangtao Tux's lil' helper
Joined: 16 Mar 2004 Posts: 80
|
Posted: Wed Sep 13, 2006 10:38 am Post subject: |
|
|
glibc can't be built ......
error......
|
|
Back to top |
|
|
ciaranm Retired Dev
Joined: 19 Jul 2003 Posts: 1719 Location: In Hiding
|
Posted: Wed Sep 13, 2006 12:13 pm Post subject: |
|
|
I told you so. |
|
Back to top |
|
|
jiangtao Tux's lil' helper
Joined: 16 Mar 2004 Posts: 80
|
Posted: Thu Sep 14, 2006 11:40 am Post subject: |
|
|
any idea ? |
|
Back to top |
|
|
Dominique_71 Veteran
Joined: 17 Aug 2005 Posts: 1877 Location: Switzerland (Romandie)
|
Posted: Thu Sep 14, 2006 12:59 pm Post subject: |
|
|
jiangtao wrote: |
any idea ? |
Reinstall a stage 3, don't modify the CHOST setting, set march according to your processor and use safe CFLAGS. _________________ "Confirm You are a robot." - the singularity |
|
Back to top |
|
|
jiangtao Tux's lil' helper
Joined: 16 Mar 2004 Posts: 80
|
Posted: Thu Sep 14, 2006 1:28 pm Post subject: |
|
|
The error:
Code: | gcc cleanup_compat.c -c -std=gnu99 -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -march=pentium4 -mtune=pentium4 -pipe -Wstrict-prototypes -mpreferred-stack-boundary=2 -g -I../include -I/var/tmp/portage/glibc-2.4-r3/work/build-default-i786-pc-linux-gnu-nptl/nptl -I/var/tmp/portage/glibc-2.4-r3/work/build-default-i786-pc-linux-gnu-nptl -I../sysdeps/i386/elf -I../nptl/sysdeps/unix/sysv/linux/i386 -I../sysdeps/unix/sysv/linux/i386 -I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../ports/sysdeps/unix/sysv/i386 -I../sysdeps/unix/sysv/i386 -I../ports/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/i386 -I../ports/sysdeps/unix -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/i386/i786 -I../sysdeps/i386/i686 -I../sysdeps/i386/i486 -I../nptl/sysdeps/i386/i486 -I../nptl/sysdeps/i386/i686 -I../sysdeps/i386/fpu -I../nptl/sysdeps/i386 -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 -I../ports -I../nptl -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/pentium4-pc-linux-gnu/4.1.1/include -isystem /usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DNOT_IN_libc=1 -DIS_IN_libpthread=1 -o /var/tmp/portage/glibc-2.4-r3/work/build-default-i786-pc-linux-gnu-nptl/nptl/cleanup_compat.og -MD -MP -MF /var/tmp/portage/glibc-2.4-r3/work/build-default-i786-pc-linux-gnu-nptl/nptl/cleanup_compat.og.dt -MT /var/tmp/portage/glibc-2.4-r3/work/build-default-i786-pc-linux-gnu-nptl/nptl/cleanup_compat.og
../nptl/sysdeps/unix/sysv/linux/sem_post.c: In function '__new_sem_post':
../nptl/sysdeps/unix/sysv/linux/sem_post.c:34: warning: implicit declaration of function 'atomic_increment_val'
../nptl/sysdeps/unix/sysv/linux/sem_post.c:35: error: expected expression before 'do'
../nptl/sysdeps/unix/sysv/linux/sem_post.c:34: warning: unused variable 'nr'
make[2]: *** [/var/tmp/portage/glibc-2.4-r3/work/build-default-i786-pc-linux-gnu-nptl/nptl/sem_post.og] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/var/tmp/portage/glibc-2.4-r3/work/glibc-2.4/nptl'
make[1]: *** [nptl/subdir_lib] Error 2
make[1]: Leaving directory `/var/tmp/portage/glibc-2.4-r3/work/glibc-2.4'
make: *** [all] Error 2
!!! ERROR: sys-libs/glibc-2.4-r3 failed.
Call stack:
ebuild.sh, line 1546: Called dyn_compile
ebuild.sh, line 937: Called src_compile
glibc-2.4-r3.ebuild, line 1179: Called toolchain-glibc_src_compile
glibc-2.4-r3.ebuild, line 253: Called die
!!! make for default failed
!!! If you need support, post the topmost build error, and the call stack if relevant.
localhost ~ # |
/var/tmp/portage/glibc-2.4-r3/work/glibc-2.4/nptl/sysdeps/unix/sysv/linux/sem_post.c:
Code: | #include <shlib-compat.h>
int
__new_sem_post (sem_t *sem)
{
int *futex = (int *) sem;
int nr = atomic_increment_val (futex);
int err = lll_futex_wake (futex, nr); ///////////////////// 35 line
if (__builtin_expect (err, 0) < 0)
{
__set_errno (-err);
return -1;
}
return 0;
}
|
|
|
Back to top |
|
|
|