On Thu, 24 Feb 2005, Benjamin Collar wrote:

> Hi Peter
> 
> Thanks for the info. I resolved the access-denied by taking out
> sandboxing from FEATURES. I resolved the PIE problem by finally managing
> to emerge the exactly-correct binutils.

Gentoo binutils >= 2.14.90.0.8-r? should have pie support, all 2.15 have 
it "natively".
For gcc-3.3.5-r1 I have attached a patch that solves 2 problems:
a. allows starting from a non-hardened stage1 to build a hardened system 
(libiberty-pic patch was removed for some reason)
b. allows to cross-compile (tested for arm on x86)

> 
> If either you or Mike have time, could you write what you know about
> which binutils to install for which cross-compiler on the wiki? It'd be
> very nice to know which compilers are buildable and which requirements
> they have wrt. binutils-versions on the host and for the target. A
> little table is all we really need:
> 
> Target-name   binutils-host   binutils-target gcc-version     builds?

Mike has following info about arm: glibc fails w/ other binutils than 
2.14.90.0.6 (not usable for hardened) and 2.15.90.0.3, until glibc cant be 
built natively w/ other binutils, none other will be considered ok for arm
the same applies to gcc, only gcc >= 3.3.5-r1 && < 3.4 can build glibc on 
arm natively
I have following info: dont use hardened,pic,pie on arm (pie creation 
produces currently text relocations in all bins), also all libs have 
TEXTREL. I havent had the possibility to check further, but it seems to be 
a toolchain issue.
If you want some sort of hardened enhancement on arm, you may use an ssp 
enabled specs config for gcc.

Peter

-- 
Peter S. Mazinger <ps dot m at gmx dot net>           ID: 0xA5F059F2
Key fingerprint = 92A4 31E1 56BC 3D5A 2D08  BB6E C389 975E A5F0 59F2
--- /usr/portage/sys-devel/gcc/gcc-3.3.5-r1.ebuild      2005-02-12 22:08:36 
+0100
+++ ./gcc-3.3.5-r1.ebuild       2005-02-21 01:33:07 +0100
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.5-r1.ebuild,v 1.19 
2005/02/12 20:58:20 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-3.3.5-r1.ebuild,v 1.16 
2005/02/02 23:43:37 vapier Exp $
 
 GENTOO_TOOLCHAIN_BASE_URI="http://dev.gentoo.org/~lv/GCC/";
 #GCC_MANPAGE_VERSION="3.3.4"
@@ -17,7 +17,7 @@
 
 # arch/libc configurations known to be stable with {PIE,SSP}-by-default
 SSP_STABLE="x86 sparc amd64"
-SSP_UCLIBC_STABLE=""
+SSP_UCLIBC_STABLE="arm mips ppc x86"
 PIE_GLIBC_STABLE="x86 sparc amd64"
 PIE_UCLIBC_STABLE="x86 mips ppc"
 
@@ -110,4 +110,7 @@
 
        # Don't screw with directories when cross-compiling
        epatch ${FILESDIR}/3.3.5/gcc-3.3.5-no-COPYING-cross-compile.patch
+
+       epatch ${FILESDIR}/3.3.3/gcc-3.3.3-libiberty-pic.patch
+       [[ ${CTARGET} != ${CHOST} ]] && sed -i 
's:^inhibit_libc=.*:inhibit_libc=-Dinhibit_libc:' ${S}/gcc/configure
 }
--
[email protected] mailing list

Reply via email to