And now it's out!SteveYin wrote:gcc mail list says gcc 4.0.2 will be released today or tommorow..
chtephan: Does your hardened gcc set -D_FORTIFY_SOURCE=1 by default in the spec-file? Otherwise that migh be a good idea.

Code: Select all
test -z "/usr/lib" || mkdir -p -- "/var/tmp/portage/gcc-4.0.2/image//usr/lib"
/bin/sh ../libtool --mode=install /bin/install -c 'libstdc++.la' '/var/tmp/portage/gcc-4.0.2/image//usr/lib/libstdc++.la'
/bin/install -c .libs/libstdc++.so.6.0.6 /var/tmp/portage/gcc-4.0.2/image//usr/lib/libstdc++.so.6.0.6
(cd /var/tmp/portage/gcc-4.0.2/image//usr/lib && rm -f libstdc++.so.6 && ln -s libstdc++.so.6.0.6 libstdc++.so.6)
(cd /var/tmp/portage/gcc-4.0.2/image//usr/lib && rm -f libstdc++.so && ln -s libstdc++.so.6.0.6 libstdc++.so)
/bin/install -c .libs/libstdc++.lai /var/tmp/portage/gcc-4.0.2/image//usr/lib/libstdc++.la
libtool: install: warning: remember to run `libtool --finish /usr/lib'
i686-pc-linux-gnu-ar cru libstdc++_pic.a *.o ../libsupc++/*.o
i686-pc-linux-gnu-ar: *.o: Filen eller katalogen finns inte
make[3]: *** [install-exec-local] Fel 1
make[3]: Leaving directory `/var/tmp/portage/gcc-4.0.2/work/build/i686-pc-linux-gnu/libstdc++-v3/src'
make[2]: *** [install-am] Fel 2
make[2]: Leaving directory `/var/tmp/portage/gcc-4.0.2/work/build/i686-pc-linux-gnu/libstdc++-v3/src'
make[1]: *** [install-recursive] Fel 1
make[1]: Leaving directory `/var/tmp/portage/gcc-4.0.2/work/build/i686-pc-linux-gnu/libstdc++-v3'
make: *** [install-target-libstdc++-v3] Fel 2
!!! ERROR: sys-devel/gcc-4.0.2 failed.
!!! Function gcc-compiler_src_install, Line 1478, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message.
Since -fstack-protector is on by default on hardened why not also D_FORTIFY_SOURCE? Just adding it to the CFLAGS is easier but then it just gets striped by a lot of packages.chtephan wrote:No, it doesn't add that in the specs file itself. Spec file hackery... ugh. Do you think it should be added to all hardened specs? (like the linker stuff?)
Failed as follows>>> Unpacking source...
>>> Unpacking gcc-4.0.2.tar.bz2 to /var/tmp/portage/gcc-4.0.2/work
>>> Unpacking gcc-4.0.2-patches-1.0.tar.bz2 to /var/tmp/portage/gcc-4.0.2/work
>>> Unpacking gcc-4.0.0-uclibc-patches-1.0.tar.bz2 to /var/tmp/portage/gcc-4.0.2/work
>>> Unpacking gcc-4.0.0-piepatches-v8.7.8.tar.bz2 to /var/tmp/portage/gcc-4.0.2/work
* Applying Gentoo patches ...
* 01_all_gcc4-ice-hack.patch ... [ ok ]
* 02_all_gcc4-ppc64-m32-m64-multilib-only.patch ... [ ok ]
* 03_all_gcc4-ia64-libunwind.patch ... [ ok ]
* 04_all_gcc4-java-nomulti.patch ... [ ok ]
* 05_all_gcc4-pr17965.patch ... [ ok ]
* 06_all_gcc4-pr22052.patch ... [ ok ]
* 07_all_gcc4-pr21254.patch ...
* Failed Patch: 07_all_gcc4-pr21254.patch !
* ( /var/tmp/portage/gcc-4.0.2/work/patch/07_all_gcc4-pr21254.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/gcc-4.0.2/temp/07_all_gcc4-pr21254.patch-14529.out
!!! ERROR: sys-devel/gcc-4.0.2 failed.
!!! Function epatch, Line 361, Exitcode 0
!!! Failed Patch: 07_all_gcc4-pr21254.patch!
!!! If you need support, post the topmost build error, NOT this status message.
System is amd64 using '2005.1/no-muultilib' profile.***** 07_all_gcc4-pr21254.patch *****
=====================================
PATCH COMMAND: patch -p0 -g0 --no-backup-if-mismatch < /var/tmp/portage/gcc-4.0.2/work/patch/07_all_gcc4-pr21254.patch
=====================================
patching file gcc/loop-iv.c
Hunk #1 FAILED at 2166.
Hunk #2 FAILED at 2176.
Hunk #3 FAILED at 2203.
Hunk #4 FAILED at 2214.
Hunk #5 FAILED at 2326.
Hunk #6 FAILED at 2470.
Hunk #7 FAILED at 2538.
Hunk #8 FAILED at 2636.
8 out of 8 hunks FAILED -- saving rejects to file gcc/loop-iv.c.rej
patching file gcc/loop-unroll.c
Hunk #1 succeeded at 442 with fuzz 2 (offset 70 lines).
Hunk #2 FAILED at 512.
1 out of 2 hunks FAILED -- saving rejects to file gcc/loop-unroll.c.rej
=====================================
<4-pr21254.patch-14529.out" [converted] 127L, 4980C 1,1
I can never tell anymore in this thread. Is this with the package in the tree?fredor wrote:Compiling gcc-4.0.2 failed applying patch ' 07_all_gcc4-pr21254.patch!'Failed as follows>>> Unpacking source...
>>> Unpacking gcc-4.0.2.tar.bz2 to /var/tmp/portage/gcc-4.0.2/work
>>> Unpacking gcc-4.0.2-patches-1.0.tar.bz2 to /var/tmp/portage/gcc-4.0.2/work
>>> Unpacking gcc-4.0.0-uclibc-patches-1.0.tar.bz2 to /var/tmp/portage/gcc-4.0.2/work
>>> Unpacking gcc-4.0.0-piepatches-v8.7.8.tar.bz2 to /var/tmp/portage/gcc-4.0.2/work
* Applying Gentoo patches ...
* 01_all_gcc4-ice-hack.patch ... [ ok ]
* 02_all_gcc4-ppc64-m32-m64-multilib-only.patch ... [ ok ]
* 03_all_gcc4-ia64-libunwind.patch ... [ ok ]
* 04_all_gcc4-java-nomulti.patch ... [ ok ]
* 05_all_gcc4-pr17965.patch ... [ ok ]
* 06_all_gcc4-pr22052.patch ... [ ok ]
* 07_all_gcc4-pr21254.patch ...
* Failed Patch: 07_all_gcc4-pr21254.patch !
* ( /var/tmp/portage/gcc-4.0.2/work/patch/07_all_gcc4-pr21254.patch )
*
* Include in your bugreport the contents of:
*
* /var/tmp/portage/gcc-4.0.2/temp/07_all_gcc4-pr21254.patch-14529.out
!!! ERROR: sys-devel/gcc-4.0.2 failed.
!!! Function epatch, Line 361, Exitcode 0
!!! Failed Patch: 07_all_gcc4-pr21254.patch!
!!! If you need support, post the topmost build error, NOT this status message.
The patchset on the mirrors does not have that patch in it. Never hasfredor wrote:It is complied from portage with package.keyword set to '-*'
Which patchset should I be using?

Code: Select all
emerge gcc
switch to gcc 4.0.2
emerge gcc
emerge linux-headers glibc binutils-config binutils gcc-config gcc
emerge glibc binutils gcc
emerge -e system
The makefile for gcc-4.0.2 is somewhat screwed up. It shouldn't be calling the current system compiler at that point. There is a bug open about this on our bugzilla, and GCC's.gpierce wrote:I also couldn't compile gcc-4.0.2 with gcc-3.4.4. I keep getting "internal errors" messages when I try. Some have claimed that it is a result of a defective/failing/overheated CPU, but I am not so sure as I everything else (even OO) compiles just fine. So, I think I will try to install gcc-3.3.5 and try with that instead.
Code: Select all
creating cache ./config.cache
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking build system type... x86_64-pc-linux-gnu
checking for a BSD compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc -march=k8 -O2 -pipe -Wl,-O1) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
!!! ERROR: sys-devel/binutils-2.16.1 failed.
!!! Function toolchain-binutils_src_compile, Line 124, Exitcode 1
!!! configure failed