diff options
282 files changed, 2107 insertions, 9661 deletions
diff --git a/README b/README deleted file mode 100644 index bad7a44a..00000000 --- a/README +++ /dev/null @@ -1,22 +0,0 @@ -This overlay is for Hardened Development, this is where we can test hardened toolchain, bugfixes, packages, profiles and eclasses before -commiting to the tree. - -Keep the entire overlay to that of gentoo policy, all functions of the overlay will work there way to the tree, once we reach a state -that is acceptable for use by the users. - -For help on using and testing the overlay please refer to : -Forum tread http://forums.gentoo.org/viewtopic-t-790110.html - -Bugs should be filled on bugs.gentoo.org, please ensure that you make it clear that the bug is -caused or a part of the hardened-dev overlay, if you are unsure file an advanced bug report and -assign to hardened-dev@gentoo.org and someone from dev team will reassign if needed; more -info http://hardened.gentooexperimental.org/trac/secure/ -The testing branch is for GCC 4.5 and if we need to do major change on this overlay. - -Commiters: -Magnus Granberg (Zorry) <zorry@ume.nu> -Jory A. Pratt (Anarchy) <anarchy@gentoo.org> -Peter Hjalmarsson (Xake) <xake@rymdraket.net> -Anthony G. Basile (blueness) <basile@opensource.dyc.edu> - -2009-09-18 Magnus Granberg (Zorry) <zorry@ume.nu> diff --git a/dev-lang/spidermonkey/ChangeLog b/dev-lang/spidermonkey/ChangeLog deleted file mode 100644 index 83bb9bf6..00000000 --- a/dev-lang/spidermonkey/ChangeLog +++ /dev/null @@ -1,12 +0,0 @@ -# ChangeLog for dev-lang/spidermonkey -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*spidermonkey-1.7.0-r1 (05 Sep 2009) - - 05 Sep 2009; Anthony G. Basile <basile@opensource.dyc.edu> - +files/spidermonkey-1.5-build.patch, +files/spidermonkey-1.6-header.patch, - +spidermonkey-1.7.0-r1.ebuild, +files/spidermonkey-1.7.0-threadsafe.diff, - +files/linker_hardened.patch: - Fix bug #74 Thanks Dwokfur - diff --git a/dev-lang/spidermonkey/Manifest b/dev-lang/spidermonkey/Manifest deleted file mode 100644 index c26c0ebc..00000000 --- a/dev-lang/spidermonkey/Manifest +++ /dev/null @@ -1,8 +0,0 @@ -AUX linker_hardened.patch 746 RMD160 274cc60322a246aa605e59c5c5b7a77958449092 SHA1 c89765670af568404f2faff5fae4a2b2a943f85e SHA256 1c9059c84a96ae714be8e76c0da9fa8b81245391aff5ef9efd2bf31907422b4b -AUX spidermonkey-1.5-build.patch 3457 RMD160 323b186d6be267bce42f15fe0694b8c17d1e927d SHA1 995708c8cbd03ed690505fab70a54349d4b94d09 SHA256 04a2b3b1b85825f463c6eb703d32e66747e2a8cca81b0026b958862eb1248fdb -AUX spidermonkey-1.6-header.patch 270 RMD160 ff656884925470695542b2b9412a130c72577f3a SHA1 6039b01f565b2bf2c20490a52b99b52796057b61 SHA256 e81acd7ba025214b2ecfa5918a1652e4590eaca39307c4e8d9f5d949d315373e -AUX spidermonkey-1.7.0-threadsafe.diff 513 RMD160 894fd8791cdf3156031e4cb370a0de40ce53cdf2 SHA1 cd4d61468ca2fdd1f90b6bb207ebf46427261166 SHA256 3e41354e093efce3fe897814bc490aa45e17c9d6d0ca6ae7f9f1550b85be89e9 -DIST js-1.7.0.tar.gz 1165607 RMD160 6eadf1ac7c10a13b3db3d499856c9e18ddbcdfdb SHA1 1a99e8e10cb6600a03ea98895583a8ed42136d1f SHA256 44363f0f3895800ee6010763eae90c0d15ed28e07d783bc7b3c607ce98d8668b -EBUILD spidermonkey-1.7.0-r1.ebuild 1479 RMD160 c0ddeb639fa1498c63d58b57f484c621d1864087 SHA1 9a32f6ff69539432fe02dc324ff3ec6847b6ba47 SHA256 6827f6a9c597d54a84c53ba94fa9b05ceefe3091706de103b6fcc74edb8c6bc3 -MISC ChangeLog 436 RMD160 517b94db62a8cd3a7f7eee55d11883f728374de4 SHA1 0d3102941ac586a96a49ecedaa0452f9f1ee1752 SHA256 34f1e05c3fe4eaa1aa187b027f4b331140601bcba9b56ebaa42d2942b0c3d5f2 -MISC metadata.xml 433 RMD160 a8aa33c0f430f8f80a47adaab4415bc8d0df057b SHA1 29c765414b22f2fa56ed0eb4f780ee3ec16da6a5 SHA256 39727d30931062610a21875826740d8661ab5afffcb94746ed961baac437f083 diff --git a/dev-lang/spidermonkey/files/linker_hardened.patch b/dev-lang/spidermonkey/files/linker_hardened.patch deleted file mode 100644 index 3696aee5..00000000 --- a/dev-lang/spidermonkey/files/linker_hardened.patch +++ /dev/null @@ -1,17 +0,0 @@ -2009-09-05 Dwokfur <atoth@atoth.sote.hu> - - #74 on http://hardened.gentooexperimental.org/trac/secure - * src/config/Linux_All.mk: resolve linking difficulting with shared libraries compiled with -fPIC - -diff -urN js.dwokfur1/src/config/Linux_All.mk js.dwokfur2/src/config/Linux_All.mk ---- js.dwokfur1/src/config/Linux_All.mk 2009-08-29 12:11:48.000000000 +0200 -+++ js.dwokfur2/src/config/Linux_All.mk 2009-08-29 12:13:13.000000000 +0200 -@@ -45,7 +45,7 @@ - OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R - - RANLIB = echo --MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS) -soname $(notdir $@) -+MKSHLIB = $(CC) -shared $(XMKSHLIBOPTS) -Xlinker -soname -Xlinker $(notdir $@) - - #.c.o: - # $(CC) -c -MD $*.d $(CFLAGS) $< diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch b/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch deleted file mode 100644 index a5c4b47d..00000000 --- a/dev-lang/spidermonkey/files/spidermonkey-1.5-build.patch +++ /dev/null @@ -1,138 +0,0 @@ ---- js/src/Makefile.ref -+++ js/src/Makefile.ref -@@ -127,7 +127,7 @@ endif - ifdef JS_READLINE - # For those platforms with the readline library installed. - DEFINES += -DEDITLINE --PROG_LIBS += -lreadline -ltermcap -+PROG_LIBS += -lreadline - else - ifdef JS_EDITLINE - # Use the editline library, built locally. -@@ -370,3 +370,16 @@ TARFILES = files `cat files` - SUFFIXES: .i - %.i: %.c - $(CC) -C -E $(CFLAGS) $< > $*.i -+ -+DESTDIR := -+PREFIX := /usr -+BINDIR := $(PREFIX)/bin -+MY_LIBDIR := $(PREFIX)/$(LIBDIR) -+INCLUDEDIR := $(PREFIX)/include/js -+INSTALL := install -g 0 -o root -+install: -+ $(INSTALL) -m 755 -d $(DESTDIR)$(INCLUDEDIR) $(DESTDIR)$(MY_LIBDIR) $(DESTDIR)$(BINDIR) -+ $(INSTALL) -m 755 $(SHARED_LIBRARY) $(DESTDIR)$(MY_LIBDIR) -+ $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(MY_LIBDIR) -+ $(INSTALL) -m 755 $(OBJDIR)/js $(OBJDIR)/jscpucfg $(DESTDIR)$(BINDIR) -+ $(INSTALL) -m 644 $(HFILES) $(DESTDIR)$(INCLUDEDIR) ---- js/src/config/Linux_All.mk -+++ js/src/config/Linux_All.mk -@@ -41,37 +41,15 @@ - # Config for all versions of Linux - # - --CC = gcc --CCC = g++ - CFLAGS += -Wall -Wno-format - OS_CFLAGS = -DXP_UNIX -DSVR4 -DSYSV -D_BSD_SOURCE -DPOSIX_SOURCE -DHAVE_LOCALTIME_R - - RANLIB = echo --MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS) -+MKSHLIB = $(LD) -shared $(XMKSHLIBOPTS) -soname $(notdir $@) - - #.c.o: - # $(CC) -c -MD $*.d $(CFLAGS) $< - --CPU_ARCH = $(shell uname -m) --# don't filter in x86-64 architecture --ifneq (x86_64,$(CPU_ARCH)) --ifeq (86,$(findstring 86,$(CPU_ARCH))) --CPU_ARCH = x86 --OS_CFLAGS+= -DX86_LINUX -- --ifeq (gcc, $(CC)) --# if using gcc on x86, check version for opt bug --# (http://bugzilla.mozilla.org/show_bug.cgi?id=24892) --GCC_VERSION := $(shell gcc -v 2>&1 | grep version | awk '{ print $$3 }') --GCC_LIST:=$(sort 2.91.66 $(GCC_VERSION) ) -- --ifeq (2.91.66, $(firstword $(GCC_LIST))) --CFLAGS+= -DGCC_OPT_BUG --endif --endif --endif --endif -- - GFX_ARCH = x - - OS_LIBS = -lm -lc -@@ -88,16 +66,6 @@ - endif - - # Use the editline library to provide line-editing support. --JS_EDITLINE = 1 -+JS_READLINE = 1 - --ifeq ($(CPU_ARCH),x86_64) --# Use VA_COPY() standard macro on x86-64 --# FIXME: better use it everywhere - OS_CFLAGS += -DHAVE_VA_COPY -DVA_COPY=va_copy --endif -- --ifeq ($(CPU_ARCH),x86_64) --# We need PIC code for shared libraries --# FIXME: better patch rules.mk & fdlibm/Makefile* --OS_CFLAGS += -DPIC -fPIC --endif ---- js/src/rules.mk -+++ js/src/rules.mk -@@ -82,6 +82,10 @@ $(OBJDIR)/%.o: %.c - @$(MAKE_OBJDIR) - $(CC) -o $@ -c $(CFLAGS) $*.c - -+$(OBJDIR)/%.lo: %.c -+ @$(MAKE_OBJDIR) -+ $(CC) -o $@ -c $(CFLAGS) $*.c -fPIC -+ - $(OBJDIR)/%.o: %.s - @$(MAKE_OBJDIR) - $(AS) -o $@ $(ASFLAGS) $*.s -@@ -111,11 +115,12 @@ $(SHARED_LIBRARY): $(LIB_OBJS) - /implib:"$(OBJDIR)/$(@F:.dll=.lib)" $^ - else - $(LIBRARY): $(LIB_OBJS) -- $(AR) rv $@ $? -+ $(AR) cr $@ $? - $(RANLIB) $@ - --$(SHARED_LIBRARY): $(LIB_OBJS) -- $(MKSHLIB) -o $@ $(LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS) -+SHARED_LIB_OBJS := $(LIB_OBJS:.o=.lo) -+$(SHARED_LIBRARY): $(SHARED_LIB_OBJS) -+ $(MKSHLIB) -o $@ $(SHARED_LIB_OBJS) $(LDFLAGS) $(OTHER_LIBS) - endif - endif - ---- js/src/fdlibm/Makefile.ref -+++ js/src/fdlibm/Makefile.ref -@@ -151,7 +151,7 @@ - - $(OBJDIR)/%.o: %.c - @$(MAKE_OBJDIR) -- $(CC) -o $@ -c $(CFLAGS) $*.c -+ $(CC) -o $@ -c $(CFLAGS) $*.c -fPIC - - $(OBJDIR)/%.o: %.s - @$(MAKE_OBJDIR) ---- js/src/config.mk -+++ js/src/config.mk -@@ -112,6 +112,8 @@ - CP = cp - endif - -+BUILD_OPT := 1 -+ - ifdef BUILD_OPT - OPTIMIZER = -O - DEFINES += -UDEBUG -DNDEBUG -UDEBUG_$(shell whoami) diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.6-header.patch b/dev-lang/spidermonkey/files/spidermonkey-1.6-header.patch deleted file mode 100644 index df4cf7d5..00000000 --- a/dev-lang/spidermonkey/files/spidermonkey-1.6-header.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: src/Makefile.ref -=================================================================== ---- src.orig/Makefile.ref -+++ src/Makefile.ref -@@ -185,6 +185,8 @@ JS_HFILES = \ - jsstr.h \ - jsxdrapi.h \ - jsxml.h \ -+ jsutil.h \ -+ jsprf.h \ - $(NULL) - - API_HFILES = \ diff --git a/dev-lang/spidermonkey/files/spidermonkey-1.7.0-threadsafe.diff b/dev-lang/spidermonkey/files/spidermonkey-1.7.0-threadsafe.diff deleted file mode 100644 index 8728811f..00000000 --- a/dev-lang/spidermonkey/files/spidermonkey-1.7.0-threadsafe.diff +++ /dev/null @@ -1,18 +0,0 @@ -Index: src/Makefile.ref -=================================================================== ---- src.orig/Makefile.ref -+++ src/Makefile.ref -@@ -63,11 +63,11 @@ INCLUDES += -I$(OBJDIR) - - ifdef JS_THREADSAFE - DEFINES += -DJS_THREADSAFE --INCLUDES += -I$(DIST)/include/nspr -+INCLUDES += -I/usr/include/nspr - ifdef USE_MSVC - OTHER_LIBS += $(DIST)/lib/libnspr$(NSPR_LIBSUFFIX).lib - else --OTHER_LIBS += -L$(DIST)/lib -lnspr$(NSPR_LIBSUFFIX) -+OTHER_LIBS += -L/usr/$(LIBDIR)/nspr -lnspr$(NSPR_LIBSUFFIX) - endif - endif - diff --git a/dev-lang/spidermonkey/metadata.xml b/dev-lang/spidermonkey/metadata.xml deleted file mode 100644 index 64708559..00000000 --- a/dev-lang/spidermonkey/metadata.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <herd>no-herd</herd> - <maintainer> - <email>aballier@gentoo.org</email> - <name>Alexis Ballier</name> - </maintainer> - <longdescription lang="en"> - Stand-alone JavaScript C library - </longdescription> - <use> - <flag name='threadsafe'>Build a threadsafe version of spidermonkey</flag> - </use> -</pkgmetadata> - diff --git a/dev-lang/spidermonkey/spidermonkey-1.7.0-r1.ebuild b/dev-lang/spidermonkey/spidermonkey-1.7.0-r1.ebuild deleted file mode 100644 index 7d1c8d88..00000000 --- a/dev-lang/spidermonkey/spidermonkey-1.7.0-r1.ebuild +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/spidermonkey/spidermonkey-1.7.0.ebuild,v 1.7 2007/12/29 16:58:01 ranger Exp $ - -inherit eutils toolchain-funcs multilib - -MY_P="js-${PV}" -DESCRIPTION="Stand-alone JavaScript C library" -HOMEPAGE="http://www.mozilla.org/js/spidermonkey/" -SRC_URI="ftp://ftp.mozilla.org/pub/mozilla.org/js/${MY_P}.tar.gz" - -LICENSE="NPL-1.1" -SLOT="0" -KEYWORDS="alpha amd64 hppa ppc ppc64 sparc x86 ~x86-fbsd" -IUSE="threadsafe" - -S="${WORKDIR}/js/src" - -RDEPEND="threadsafe? ( dev-libs/nspr )" - -DEPEND="${RDEPEND}" - -src_unpack() { - unpack ${A} - cd "${S}" - epatch "${FILESDIR}/${PN}-1.5-build.patch" - epatch "${FILESDIR}/${PN}-1.6-header.patch" - epatch "${FILESDIR}/${P}-threadsafe.diff" - epatch "${FILESDIR}/linker_hardened.patch" - if [[ ${CHOST} == *-freebsd* ]]; then - # Don't try to be smart, this does not work in cross-compile anyway - ln -s "${S}/config/Linux_All.mk" "${S}/config/$(uname -s)$(uname -r).mk" - fi -} - -src_compile() { - tc-export CC LD AR - if use threadsafe; then - emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" JS_THREADSAFE=1 \ - || die "emake with threadsafe enabled failed"; - else - emake -j1 -f Makefile.ref LIBDIR="$(get_libdir)" \ - || die "emake without threadsafe enabled failed"; - fi -} - -src_install() { - emake -f Makefile.ref install DESTDIR="${D}" LIBDIR="$(get_libdir)" || die - dodoc ../jsd/README - dohtml README.html -} diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass deleted file mode 100644 index 6a79b2f4..00000000 --- a/eclass/flag-o-matic.eclass +++ /dev/null @@ -1,749 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.144 2009/08/16 00:16:12 vapier Exp $ - -# @ECLASS: flag-o-matic.eclass -# @MAINTAINER: -# toolchain@gentoo.org -# @BLURB: common functions to manipulate and query toolchain flags -# @DESCRIPTION: -# This eclass contains a suite of functions to help developers sanely -# and safely manage toolchain flags in their builds. - -inherit eutils toolchain-funcs multilib - -################ DEPRECATED functions ################ -# The following are still present to avoid breaking existing -# code more than necessary; however they are deprecated. Please -# use gcc-specs-* from toolchain-funcs.eclass instead, if you -# need to know which hardened techs are active in the compiler. -# See bug #100974 -# -# has_hardened -# has_pie -# has_pic -# has_ssp_all -# has_ssp - - -# {C,CXX,F,FC}FLAGS that we allow in strip-flags -# Note: shell globs and character lists are allowed -setup-allowed-flags() { - if [[ -z ${ALLOWED_FLAGS} ]] ; then - export ALLOWED_FLAGS="-pipe" - export ALLOWED_FLAGS="${ALLOWED_FLAGS} -O -O0 -O1 -O2 -mcpu -march -mtune" - export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fstack-protector -fstack-protector-all" - export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fbounds-checking -fno-strict-overflow" - export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-PIE -fno-pie -fno-unit-at-a-time" - export ALLOWED_FLAGS="${ALLOWED_FLAGS} -g -g[0-9] -ggdb -ggdb[0-9] -gstabs -gstabs+" - export ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-ident" - export ALLOWED_FLAGS="${ALLOWED_FLAGS} -W* -w" - fi - # allow a bunch of flags that negate features / control ABI - ALLOWED_FLAGS="${ALLOWED_FLAGS} -fno-stack-protector -fno-stack-protector-all \ - -fno-strict-aliasing -fno-bounds-checking -fstrict-overflow -fno-omit-frame-pointer" - ALLOWED_FLAGS="${ALLOWED_FLAGS} -mregparm -mno-app-regs -mapp-regs \ - -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-ssse3 -mno-sse4 -mno-sse4.1 \ - -mno-sse4.2 -mno-avx -mno-aes -mno-pclmul -mno-sse4a -mno-3dnow \ - -mno-popcnt -mno-abm \ - -mips1 -mips2 -mips3 -mips4 -mips32 -mips64 -mips16 -mplt \ - -msoft-float -mno-soft-float -mhard-float -mno-hard-float -mfpu \ - -mieee -mieee-with-inexact -mschedule \ - -mtls-direct-seg-refs -mno-tls-direct-seg-refs \ - -mflat -mno-flat -mno-faster-structs -mfaster-structs \ - -m32 -m64 -mabi -mlittle-endian -mbig-endian -EL -EB -fPIC \ - -mlive-g0 -mcmodel -mstack-bias -mno-stack-bias \ - -msecure-plt -m*-toc -D* -U*" - - # {C,CXX,F,FC}FLAGS that we are think is ok, but needs testing - # NOTE: currently -Os have issues with gcc3 and K6* arch's - export UNSTABLE_FLAGS="-Os -O3 -freorder-blocks" - return 0 -} - -# inverted filters for hardened compiler. This is trying to unpick -# the hardened compiler defaults. -_filter-hardened() { - local f - for f in "$@" ; do - case "${f}" in - # Ideally we should only concern ourselves with PIE flags, - # not -fPIC or -fpic, but too many places filter -fPIC without - # thinking about -fPIE. - -fPIC|-fpic|-fPIE|-fpie|-Wl,pie|-pie) - gcc-specs-pie || continue - is-flagq -nopie || append-flags -nopie;; - -fstack-protector) - gcc-specs-ssp || continue - is-flagq -fno-stack-protector || append-flags $(test-flags -fno-stack-protector) - _is_flagq CFLAGS -fno-stack-protector || append-cflags $(test-flags-CC -fno-stack-protector) - _is_flagq CXXFLAGS -fno-stack-protector || append-cxxflags $(test-flags-CXX -fno-stack-protector);; - -fstack-protector-all) - gcc-specs-ssp-to-all || continue - is-flagq -fno-stack-protector-all || append-flags $(test-flags -fno-stack-protector-all);; - -fno-strict-overflow) - gcc-specs-nostrict || continue - is-flagq -fstrict-overflow || append-flags $(test-flags -fstrict-overflow);; - esac - done -} - -# Remove occurrences of strings from variable given in $1 -# Strings removed are matched as globs, so for example -# '-O*' would remove -O1, -O2 etc. -_filter-var() { - local f x VAR VAL - declare -a new - - VAR=$1 - shift - eval VAL=\${${VAR}} - for f in ${VAL}; do - for x in "$@"; do - # Note this should work with globs like -O* - [[ ${f} == ${x} ]] && continue 2 - done - eval new\[\${\#new\[@]}]=\${f} - done - eval export ${VAR}=\${new\[*]} -} - -# @FUNCTION: filter-flags -# @USAGE: <flags> -# @DESCRIPTION: -# Remove particular <flags> from {C,CPP,CXX,F,FC}FLAGS. Accepts shell globs. -filter-flags() { - _filter-hardened "$@" - _filter-var CFLAGS "$@" - _filter-var CPPFLAGS "$@" - _filter-var CXXFLAGS "$@" - _filter-var FFLAGS "$@" - _filter-var FCFLAGS "$@" - return 0 -} - -# @FUNCTION: filter-lfs-flags -# @DESCRIPTION: -# Remove flags that enable Large File Support. -filter-lfs-flags() { - [[ -n $@ ]] && die "filter-lfs-flags takes no arguments" - filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -} - -# @FUNCTION: append-cppflags -# @USAGE: <flags> -# @DESCRIPTION: -# Add extra <flags> to the current CPPFLAGS. -append-cppflags() { - [[ -z $* ]] && return 0 - export CPPFLAGS="${CPPFLAGS} $*" - return 0 -} - -# @FUNCTION: append-cflags -# @USAGE: <flags> -# @DESCRIPTION: -# Add extra <flags> to the current CFLAGS. -append-cflags() { - [[ -z $* ]] && return 0 - export CFLAGS="${CFLAGS} $*" - return 0 -} - -# @FUNCTION: append-cxxflags -# @USAGE: <flags> -# @DESCRIPTION: -# Add extra <flags> to the current CXXFLAGS. -append-cxxflags() { - [[ -z $* ]] && return 0 - export CXXFLAGS="${CXXFLAGS} $*" - return 0 -} - -# @FUNCTION: append-fflags -# @USAGE: <flags> -# @DESCRIPTION: -# Add extra <flags> to the current {F,FC}FLAGS. -append-fflags() { - [[ -z $* ]] && return 0 - export FFLAGS="${FFLAGS} $*" - export FCFLAGS="${FCFLAGS} $*" - return 0 -} - -# @FUNCTION: append-lfs-flags -# @DESCRIPTION: -# Add flags that enable Large File Support. -append-lfs-flags() { - [[ -n $@ ]] && die "append-lfs-flags takes no arguments" - append-cppflags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -} - -# @FUNCTION: append-flags -# @USAGE: <flags> -# @DESCRIPTION: -# Add extra <flags> to your current {C,CXX,F,FC}FLAGS. -append-flags() { - [[ -z $* ]] && return 0 - append-cflags "$@" - append-cxxflags "$@" - append-fflags "$@" - return 0 -} - -# @FUNCTION: replace-flags -# @USAGE: <old> <new> -# @DESCRIPTION: -# Replace the <old> flag with <new>. Accepts shell globs for <old>. -replace-flags() { - [[ $# != 2 ]] \ - && echo && eerror "Usage: replace-flags <old flag> <new flag>" \ - && die "replace-flags takes 2 arguments, not $#" - - local f fset - declare -a new_CFLAGS new_CXXFLAGS new_FFLAGS new_FCFLAGS - - for fset in CFLAGS CXXFLAGS FFLAGS FCFLAGS; do - # Looping over the flags instead of using a global - # substitution ensures that we're working with flag atoms. - # Otherwise globs like -O* have the potential to wipe out the - # list of flags. - for f in ${!fset}; do - # Note this should work with globs like -O* - [[ ${f} == ${1} ]] && f=${2} - eval new_${fset}\[\${\#new_${fset}\[@]}]=\${f} - done - eval export ${fset}=\${new_${fset}\[*]} - done - - return 0 -} - -# @FUNCTION: replace-cpu-flags -# @USAGE: <old> <new> -# @DESCRIPTION: -# Replace cpu flags (like -march/-mcpu/-mtune) that select the <old> cpu -# with flags that select the <new> cpu. Accepts shell globs for <old>. -replace-cpu-flags() { - local newcpu="$#" ; newcpu="${!newcpu}" - while [ $# -gt 1 ] ; do - # quote to make sure that no globbing is done (particularly on - # ${oldcpu}) prior to calling replace-flags - replace-flags "-march=${1}" "-march=${newcpu}" - replace-flags "-mcpu=${1}" "-mcpu=${newcpu}" - replace-flags "-mtune=${1}" "-mtune=${newcpu}" - shift - done - return 0 -} - -_is_flagq() { - local x - for x in ${!1} ; do - [[ ${x} == $2 ]] && return 0 - done - return 1 -} - -# @FUNCTION: is-flagq -# @USAGE: <flag> -# @DESCRIPTION: -# Returns shell true if <flag> is in {C,CXX,F,FC}FLAGS, else returns shell false. Accepts shell globs. -is-flagq() { - [[ -n $2 ]] && die "Usage: is-flag <flag>" - _is_flagq CFLAGS $1 || _is_flagq CXXFLAGS $1 || _is_flagq FFLAGS $1 || _is_flagq FCFLAGS $1 -} - -# @FUNCTION: is-flag -# @USAGE: <flag> -# @DESCRIPTION: -# Echo's "true" if flag is set in {C,CXX,F,FC}FLAGS. Accepts shell globs. -is-flag() { - is-flagq "$@" && echo true -} - -# @FUNCTION: is-ldflagq -# @USAGE: <flag> -# @DESCRIPTION: -# Returns shell true if <flag> is in LDFLAGS, else returns shell false. Accepts shell globs. -is-ldflagq() { - [[ -n $2 ]] && die "Usage: is-ldflag <flag>" - _is_flagq LDFLAGS $1 -} - -# @FUNCTION: is-ldflag -# @USAGE: <flag> -# @DESCRIPTION: -# Echo's "true" if flag is set in LDFLAGS. Accepts shell globs. -is-ldflag() { - is-ldflagq "$@" && echo true -} - -# @FUNCTION: filter-mfpmath -# @USAGE: <math types> -# @DESCRIPTION: -# Remove specified math types from the fpmath flag. For example, if the user -# has -mfpmath=sse,386, running `filter-mfpmath sse` will leave the user with -# -mfpmath=386. -filter-mfpmath() { - local orig_mfpmath new_math prune_math - - # save the original -mfpmath flag - orig_mfpmath=$(get-flag -mfpmath) - # get the value of the current -mfpmath flag - new_math=$(get-flag mfpmath) - new_math=" ${new_math//,/ } " - # figure out which math values are to be removed - prune_math="" - for prune_math in "$@" ; do - new_math=${new_math/ ${prune_math} / } - done - new_math=$(echo ${new_math}) - new_math=${new_math// /,} - - if [[ -z ${new_math} ]] ; then - # if we're removing all user specified math values are - # slated for removal, then we just filter the flag - filter-flags ${orig_mfpmath} - else - # if we only want to filter some of the user specified - # math values, then we replace the current flag - replace-flags ${orig_mfpmath} -mfpmath=${new_math} - fi - return 0 -} - -# @FUNCTION: strip-flags -# @DESCRIPTION: -# Strip C[XX]FLAGS of everything except known good/safe flags. -strip-flags() { - local x y flag NEW_CFLAGS NEW_CXXFLAGS NEW_FFLAGS NEW_FCFLAGS - - setup-allowed-flags - - local NEW_CFLAGS="" - local NEW_CXXFLAGS="" - local NEW_FFLAGS="" - local NEW_FCFLAGS="" - - # Allow unstable C[XX]FLAGS if we are using unstable profile ... - if has "~$(tc-arch)" ${ACCEPT_KEYWORDS} ; then - ALLOWED_FLAGS="${ALLOWED_FLAGS} ${UNSTABLE_FLAGS}" - fi - - set -f # disable pathname expansion - - for x in ${CFLAGS}; do - for y in ${ALLOWED_FLAGS}; do - flag=${x%%=*} - if [ "${flag%%${y}}" = "" ] ; then - NEW_CFLAGS="${NEW_CFLAGS} ${x}" - break - fi - done - done - - for x in ${CXXFLAGS}; do - for y in ${ALLOWED_FLAGS}; do - flag=${x%%=*} - if [ "${flag%%${y}}" = "" ] ; then - NEW_CXXFLAGS="${NEW_CXXFLAGS} ${x}" - break - fi - done - done - - for x in ${FFLAGS}; do - for y in ${ALLOWED_FLAGS}; do - flag=${x%%=*} - if [ "${flag%%${y}}" = "" ] ; then - NEW_FFLAGS="${NEW_FFLAGS} ${x}" - break - fi - done - done - - for x in ${FCFLAGS}; do - for y in ${ALLOWED_FLAGS}; do - flag=${x%%=*} - if [ "${flag%%${y}}" = "" ] ; then - NEW_FCFLAGS="${NEW_FCFLAGS} ${x}" - break - fi - done - done - - # In case we filtered out all optimization flags fallback to -O2 - if [ "${CFLAGS/-O}" != "${CFLAGS}" -a "${NEW_CFLAGS/-O}" = "${NEW_CFLAGS}" ]; then - NEW_CFLAGS="${NEW_CFLAGS} -O2" - fi - if [ "${CXXFLAGS/-O}" != "${CXXFLAGS}" -a "${NEW_CXXFLAGS/-O}" = "${NEW_CXXFLAGS}" ]; then - NEW_CXXFLAGS="${NEW_CXXFLAGS} -O2" - fi - if [ "${FFLAGS/-O}" != "${FFLAGS}" -a "${NEW_FFLAGS/-O}" = "${NEW_FFLAGS}" ]; then - NEW_FFLAGS="${NEW_FFLAGS} -O2" - fi - if [ "${FCFLAGS/-O}" != "${FCFLAGS}" -a "${NEW_FCFLAGS/-O}" = "${NEW_FCFLAGS}" ]; then - NEW_FCFLAGS="${NEW_FCFLAGS} -O2" - fi - - set +f # re-enable pathname expansion - - export CFLAGS="${NEW_CFLAGS}" - export CXXFLAGS="${NEW_CXXFLAGS}" - export FFLAGS="${NEW_FFLAGS}" - export FCFLAGS="${NEW_FCFLAGS}" - return 0 -} - -test-flag-PROG() { - local comp=$1 - local flags="$2" - - [[ -z ${comp} || -z ${flags} ]] && \ - return 1 - - local PROG=$(tc-get${comp}) - ${PROG} ${flags} -S -o /dev/null -xc /dev/null \ - > /dev/null 2>&1 -} - -# @FUNCTION: test-flag-CC -# @USAGE: <flag> -# @DESCRIPTION: -# Returns shell true if <flag> is supported by the C compiler, else returns shell false. -test-flag-CC() { test-flag-PROG "CC" "$1"; } - -# @FUNCTION: test-flag-CXX -# @USAGE: <flag> -# @DESCRIPTION: -# Returns shell true if <flag> is supported by the C++ compiler, else returns shell false. -test-flag-CXX() { test-flag-PROG "CXX" "$1"; } - -# @FUNCTION: test-flag-F77 -# @USAGE: <flag> -# @DESCRIPTION: -# Returns shell true if <flag> is supported by the Fortran 77 compiler, else returns shell false. -test-flag-F77() { test-flag-PROG "F77" "$1"; } - -# @FUNCTION: test-flag-FC -# @USAGE: <flag> -# @DESCRIPTION: -# Returns shell true if <flag> is supported by the Fortran 90 compiler, else returns shell false. -test-flag-FC() { test-flag-PROG "FC" "$1"; } - -test-flags-PROG() { - local comp=$1 - local flags - local x - - shift - - [[ -z ${comp} ]] && return 1 - - x="" - for x in "$@" ; do - test-flag-${comp} "${x}" && flags="${flags}${flags:+ }${x}" - done - - echo "${flags}" - - # Just bail if we dont have any flags - [[ -n ${flags} ]] -} - -# @FUNCTION: test-flags-CC -# @USAGE: <flags> -# @DESCRIPTION: -# Returns shell true if <flags> are supported by the C compiler, else returns shell false. -test-flags-CC() { test-flags-PROG "CC" "$@"; } - -# @FUNCTION: test-flags-CXX -# @USAGE: <flags> -# @DESCRIPTION: -# Returns shell true if <flags> are supported by the C++ compiler, else returns shell false. -test-flags-CXX() { test-flags-PROG "CXX" "$@"; } - -# @FUNCTION: test-flags-F77 -# @USAGE: <flags> -# @DESCRIPTION: -# Returns shell true if <flags> are supported by the Fortran 77 compiler, else returns shell false. -test-flags-F77() { test-flags-PROG "F77" "$@"; } - -# @FUNCTION: test-flags-FC -# @USAGE: <flags> -# @DESCRIPTION: -# Returns shell true if <flags> are supported by the Fortran 90 compiler, else returns shell false. -test-flags-FC() { test-flags-PROG "FC" "$@"; } - -# @FUNCTION: test-flags -# @USAGE: <flags> -# @DESCRIPTION: -# Short-hand that should hopefully work for both C and C++ compiler, but -# its really only present due to the append-flags() abomination. -test-flags() { test-flags-CC "$@"; } - -# @FUNCTION: test_flag -# @DESCRIPTION: -# DEPRICIATED, use test-flags() -test_flag() { - ewarn "test_flag: deprecated, please use test-flags()!" >&2 - - test-flags-CC "$@" -} - -# @FUNCTION: test_version_info -# @USAGE: <version> -# @DESCRIPTION: -# Returns shell true if the current C compiler version matches <version>, else returns shell false. -# Accepts shell globs. -test_version_info() { - if [[ $($(tc-getCC) --version 2>&1) == *$1* ]]; then - return 0 - else - return 1 - fi -} - -# @FUNCTION: strip-unsupported-flags -# @DESCRIPTION: -# Strip {C,CXX,F,FC}FLAGS of any flags not supported by the active toolchain. -strip-unsupported-flags() { - export CFLAGS=$(test-flags-CC ${CFLAGS}) - export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS}) - export FFLAGS=$(test-flags-F77 ${FFLAGS}) - export FCFLAGS=$(test-flags-FC ${FCFLAGS}) -} - -# @FUNCTION: get-flag -# @USAGE: <flag> -# @DESCRIPTION: -# Find and echo the value for a particular flag. Accepts shell globs. -get-flag() { - local f findflag="$1" - - # this code looks a little flaky but seems to work for - # everything we want ... - # for example, if CFLAGS="-march=i686": - # `get-flag -march` == "-march=i686" - # `get-flag march` == "i686" - for f in ${CFLAGS} ${CXXFLAGS} ${FFLAGS} ${FCFLAGS} ; do - if [ "${f/${findflag}}" != "${f}" ] ; then - printf "%s\n" "${f/-${findflag}=}" - return 0 - fi - done - return 1 -} - -# @FUNCTION: has_hardened -# @DESCRIPTION: -# DEPRECATED - use gcc-specs-relro or gcc-specs-now from toolchain-funcs -has_hardened() { - ewarn "has_hardened: deprecated, please use gcc-specs-{relro,now}()!" >&2 - - test_version_info Hardened && return 0 - # The specs file wont exist unless gcc has GCC_SPECS support - [[ -f ${GCC_SPECS} && ${GCC_SPECS} != ${GCC_SPECS/hardened/} ]] -} - -# @FUNCTION: has_pic -# @DESCRIPTION: -# DEPRECATED - use gcc-specs-pie from toolchain-funcs -# indicate whether PIC is set -has_pic() { - ewarn "has_pic: deprecated, please use gcc-specs-pie()!" >&2 - - [[ ${CFLAGS/-fPIC} != ${CFLAGS} || \ - ${CFLAGS/-fpic} != ${CFLAGS} ]] || \ - gcc-specs-pie -} - -# @FUNCTION: has_pie -# @DESCRIPTION: -# DEPRECATED - use gcc-specs-pie from toolchain-funcs -# indicate whether PIE is set -has_pie() { - ewarn "has_pie: deprecated, please use gcc-specs-pie()!" >&2 - - [[ ${CFLAGS/-fPIE} != ${CFLAGS} || \ - ${CFLAGS/-fpie} != ${CFLAGS} ]] || \ - gcc-specs-pie -} - -# @FUNCTION: has_ssp_all -# @DESCRIPTION: -# DEPRECATED - use gcc-specs-ssp from toolchain-funcs -# indicate whether code for SSP is being generated for all functions -has_ssp_all() { - ewarn "has_ssp_all: deprecated, please use gcc-specs-ssp()!" >&2 - - # note; this matches only -fstack-protector-all - [[ ${CFLAGS/-fstack-protector-all} != ${CFLAGS} || \ - -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP_ALL__) ]] || \ - gcc-specs-ssp-to-all -} - -# @FUNCTION: has_ssp -# @DESCRIPTION: -# DEPRECATED - use gcc-specs-ssp from toolchain-funcs -# indicate whether code for SSP is being generated -has_ssp() { - ewarn "has_ssp: deprecated, please use gcc-specs-ssp()!" >&2 - - # note; this matches both -fstack-protector and -fstack-protector-all - [[ ${CFLAGS/-fstack-protector} != ${CFLAGS} || \ - -n $(echo | $(tc-getCC) ${CFLAGS} -E -dM - | grep __SSP__) ]] || \ - gcc-specs-ssp -} - -# @FUNCTION: has_m64 -# @DESCRIPTION: -# This doesn't test if the flag is accepted, it tests if the flag actually -# WORKS. Non-multilib gcc will take both -m32 and -m64. If the flag works -# return code is 0, else the return code is 1. -has_m64() { - # this doesnt test if the flag is accepted, it tests if the flag - # actually -WORKS-. non-multilib gcc will take both -m32 and -m64! - # please dont replace this function with test_flag in some future - # clean-up! - - local temp="$(emktemp)" - echo "int main() { return(0); }" > "${temp}".c - MY_CC=$(tc-getCC) - ${MY_CC/ .*/} -m64 -o "$(emktemp)" "${temp}".c > /dev/null 2>&1 - local ret=$? - rm -f "${temp}".c - [[ ${ret} != 1 ]] && return 0 - return 1 -} - -# @FUNCTION: has_m32 -# @DESCRIPTION: -# This doesn't test if the flag is accepted, it tests if the flag actually -# WORKS. Non-mulilib gcc will take both -m32 and -64. If the flag works return -# code is 0, else return code is 1. -has_m32() { - # this doesnt test if the flag is accepted, it tests if the flag - # actually -WORKS-. non-multilib gcc will take both -m32 and -m64! - # please dont replace this function with test_flag in some future - # clean-up! - - [ "$(tc-arch)" = "amd64" ] && has_multilib_profile && return 0 - - local temp=$(emktemp) - echo "int main() { return(0); }" > "${temp}".c - MY_CC=$(tc-getCC) - ${MY_CC/ .*/} -m32 -o "$(emktemp)" "${temp}".c > /dev/null 2>&1 - local ret=$? - rm -f "${temp}".c - [[ ${ret} != 1 ]] && return 0 - return 1 -} - -# @FUNCTION: replace-sparc64-flags -# @DESCRIPTION: -# Sets mcpu to v8 and uses the original value as mtune if none specified. -replace-sparc64-flags() { - local SPARC64_CPUS="ultrasparc3 ultrasparc v9" - - if [ "${CFLAGS/mtune}" != "${CFLAGS}" ]; then - for x in ${SPARC64_CPUS}; do - CFLAGS="${CFLAGS/-mcpu=${x}/-mcpu=v8}" - done - else - for x in ${SPARC64_CPUS}; do - CFLAGS="${CFLAGS/-mcpu=${x}/-mcpu=v8 -mtune=${x}}" - done - fi - - if [ "${CXXFLAGS/mtune}" != "${CXXFLAGS}" ]; then - for x in ${SPARC64_CPUS}; do - CXXFLAGS="${CXXFLAGS/-mcpu=${x}/-mcpu=v8}" - done - else - for x in ${SPARC64_CPUS}; do - CXXFLAGS="${CXXFLAGS/-mcpu=${x}/-mcpu=v8 -mtune=${x}}" - done - fi - - export CFLAGS CXXFLAGS -} - -# @FUNCTION: append-ldflags -# @USAGE: <flags> -# @DESCRIPTION: -# Add extra <flags> to the current LDFLAGS. -append-ldflags() { - [[ -z $* ]] && return 0 - local flag - for flag in "$@"; do - [[ ${flag} == -l* ]] && \ - ewarn "Appending a library link instruction (${flag}); libraries to link to should not be passed through LDFLAGS" - done - - export LDFLAGS="${LDFLAGS} $*" - return 0 -} - -# @FUNCTION: filter-ldflags -# @USAGE: <flags> -# @DESCRIPTION: -# Remove particular <flags> from LDFLAGS. Accepts shell globs. -filter-ldflags() { - _filter-var LDFLAGS "$@" - return 0 -} - -# @FUNCTION: raw-ldflags -# @USAGE: <flags> -# @DESCRIPTION: -# Turn C style ldflags (-Wl,-foo) into straight ldflags - the results -# are suitable for passing directly to 'ld'; note LDFLAGS is usually passed -# to gcc where it needs the '-Wl,'. -raw-ldflags() { - local x input="$@" - [[ -z ${input} ]] && input=${LDFLAGS} - set -- - for x in ${input} ; do - x=${x#-Wl,} - set -- "$@" ${x//,/ } - done - echo "$@" -} - -# @FUNCTION: bindnow-flags -# @RETURN: Returns the flags to enable "now" binding in the current selected linker. -# @DESCRIPTION: -# DEPRECATED - Gets the flags needed for "NOW" binding -bindnow-flags() { - eerror "QA: stop using the bindnow-flags function ... simply drop it from your ebuild" - die "Stop using bindnow-flags." -} - - -# Some tests for when we screw with things and want to make -# sure we didn't break anything -#TESTS() { -# CFLAGS="-a -b -c=1" -# CXXFLAGS="-x -y -z=2" -# LDFLAGS="-l -m -n=3" -# -# die() { exit 1; } -# (is-flag 1 2 3) && die -# (is-ldflag 1 2 3) && die -# -# is-flagq -l && die -# is-ldflagq -a && die -# is-flagq -a || die -# is-flagq -x || die -# is-ldflagq -n=* || die -# is-ldflagq -n && die -# -# strip-unsupported-flags -# [[ ${CFLAGS} == "-c=1" ]] || die -# [[ ${CXXFLAGS} == "-y -z=2" ]] || die -# -# echo "All tests pass" -#} -#TESTS diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass deleted file mode 100644 index 87168139..00000000 --- a/eclass/toolchain.eclass +++ /dev/null @@ -1,2637 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.407 2009/09/08 02:48:46 vapier Exp $ -# -# Maintainer: Toolchain Ninjas <toolchain@gentoo.org> - -HOMEPAGE="http://gcc.gnu.org/" -LICENSE="GPL-2 LGPL-2.1" -RESTRICT="strip" # cross-compilers need controlled stripping - -#---->> eclass stuff <<---- -inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib fixheadtails - -EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test pkg_preinst src_install pkg_postinst pkg_prerm pkg_postrm -DESCRIPTION="Based on the ${ECLASS} eclass" - -FEATURES=${FEATURES/multilib-strict/} - -toolchain_pkg_setup() { - gcc_pkg_setup -} -toolchain_src_unpack() { - gcc_src_unpack -} -toolchain_src_compile() { - gcc_src_compile -} -toolchain_src_test() { - gcc_src_test -} -toolchain_pkg_preinst() { - ${ETYPE}_pkg_preinst -} -toolchain_src_install() { - ${ETYPE}_src_install -} -toolchain_pkg_postinst() { - ${ETYPE}_pkg_postinst -} -toolchain_pkg_prerm() { - ${ETYPE}_pkg_prerm -} -toolchain_pkg_postrm() { - ${ETYPE}_pkg_postrm -} -#----<< eclass stuff >>---- - - -#---->> globals <<---- -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} = ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then - export CTARGET=${CATEGORY/cross-} - fi -fi -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} - -tc_version_is_at_least() { version_is_at_least "$1" "${2:-${GCC_PV}}" ; } - - -GCC_PV=${TOOLCHAIN_GCC_PV:-${PV}} -GCC_PVR=${GCC_PV} -[[ ${PR} != "r0" ]] && GCC_PVR=${GCC_PVR}-${PR} -GCC_RELEASE_VER=$(get_version_component_range 1-3 ${GCC_PV}) -GCC_BRANCH_VER=$(get_version_component_range 1-2 ${GCC_PV}) -GCCMAJOR=$(get_version_component_range 1 ${GCC_PV}) -GCCMINOR=$(get_version_component_range 2 ${GCC_PV}) -GCCMICRO=$(get_version_component_range 3 ${GCC_PV}) -[[ ${BRANCH_UPDATE-notset} == "notset" ]] && BRANCH_UPDATE=$(get_version_component_range 4 ${GCC_PV}) - -# According to gcc/c-cppbuiltin.c, GCC_CONFIG_VER MUST match this regex. -# ([^0-9]*-)?[0-9]+[.][0-9]+([.][0-9]+)?([- ].*)? -GCC_CONFIG_VER=${GCC_CONFIG_VER:-$(replace_version_separator 3 '-' ${GCC_PV})} - -# Pre-release support -if [[ ${GCC_PV} != ${GCC_PV/_pre/-} ]] ; then - PRERELEASE=${GCC_PV/_pre/-} -fi -# make _alpha and _beta ebuilds automatically use a snapshot -if [[ ${GCC_PV} != ${GCC_PV/_alpha/} ]] ; then - SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_alpha} -elif [[ ${GCC_PV} != ${GCC_PV/_beta/} ]] ; then - SNAPSHOT=${GCC_BRANCH_VER}-${GCC_PV##*_beta} -fi -export GCC_FILESDIR=${GCC_FILESDIR:-${FILESDIR}} - -if [[ ${ETYPE} == "gcc-library" ]] ; then - GCC_VAR_TYPE=${GCC_VAR_TYPE:-non-versioned} - GCC_LIB_COMPAT_ONLY=${GCC_LIB_COMPAT_ONLY:-true} - GCC_TARGET_NO_MULTILIB=${GCC_TARGET_NO_MULTILIB:-true} -else - GCC_VAR_TYPE=${GCC_VAR_TYPE:-versioned} - GCC_LIB_COMPAT_ONLY="false" - GCC_TARGET_NO_MULTILIB=${GCC_TARGET_NO_MULTILIB:-false} -fi - -PREFIX=${TOOLCHAIN_PREFIX:-/usr} - -if [[ ${GCC_VAR_TYPE} == "versioned" ]] ; then - if tc_version_is_at_least 3.4.0 ; then - LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/lib/gcc/${CTARGET}/${GCC_CONFIG_VER}} - else - LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/lib/gcc-lib/${CTARGET}/${GCC_CONFIG_VER}} - fi - INCLUDEPATH=${TOOLCHAIN_INCLUDEPATH:-${LIBPATH}/include} - if is_crosscompile ; then - BINPATH=${TOOLCHAIN_BINPATH:-${PREFIX}/${CHOST}/${CTARGET}/gcc-bin/${GCC_CONFIG_VER}} - else - BINPATH=${TOOLCHAIN_BINPATH:-${PREFIX}/${CTARGET}/gcc-bin/${GCC_CONFIG_VER}} - fi - DATAPATH=${TOOLCHAIN_DATAPATH:-${PREFIX}/share/gcc-data/${CTARGET}/${GCC_CONFIG_VER}} - # Dont install in /usr/include/g++-v3/, but in gcc internal directory. - # We will handle /usr/include/g++-v3/ with gcc-config ... - STDCXX_INCDIR=${TOOLCHAIN_STDCXX_INCDIR:-${LIBPATH}/include/g++-v${GCC_BRANCH_VER/\.*/}} -elif [[ ${GCC_VAR_TYPE} == "non-versioned" ]] ; then - # using non-versioned directories to install gcc, like what is currently - # done for ppc64 and 3.3.3_pre, is a BAD IDEA. DO NOT do it!! However... - # setting up variables for non-versioned directories might be useful for - # specific gcc targets, like libffi. Note that we dont override the value - # returned by get_libdir here. - LIBPATH=${TOOLCHAIN_LIBPATH:-${PREFIX}/$(get_libdir)} - INCLUDEPATH=${TOOLCHAIN_INCLUDEPATH:-${PREFIX}/include} - BINPATH=${TOOLCHAIN_BINPATH:-${PREFIX}/bin} - DATAPATH=${TOOLCHAIN_DATAPATH:-${PREFIX}/share} - STDCXX_INCDIR=${TOOLCHAIN_STDCXX_INCDIR:-${PREFIX}/include/g++-v3} -fi - -#----<< globals >>---- - - -#---->> SLOT+IUSE logic <<---- -if [[ ${ETYPE} == "gcc-library" ]] ; then - IUSE="nls build test" - SLOT="${CTARGET}-${SO_VERSION_SLOT:-5}" -else - IUSE="multislot nptl test" - - if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then - IUSE="${IUSE} altivec build fortran nls nocxx" - [[ -n ${PIE_VER} ]] && IUSE="${IUSE} nopie" - [[ -n ${PP_VER} ]] && IUSE="${IUSE} nossp" - [[ -n ${HTB_VER} ]] && IUSE="${IUSE} boundschecking" - [[ -n ${D_VER} ]] && IUSE="${IUSE} d" - - if tc_version_is_at_least 3 ; then - IUSE="${IUSE} bootstrap doc gcj gtk hardened libffi multilib objc vanilla" - - # gcc-{nios2,bfin} don't accept these - if [[ ${PN} == "gcc" ]] ; then - IUSE="${IUSE} ip28 ip32r10k n32 n64" - fi - - tc_version_is_at_least "4.0" && IUSE="${IUSE} objc-gc mudflap" - tc_version_is_at_least "4.1" && IUSE="${IUSE} objc++" - tc_version_is_at_least "4.2" && IUSE="${IUSE} openmp" - tc_version_is_at_least "4.3" && IUSE="${IUSE} fixed-point" - tc_version_is_at_least "4.4" && IUSE="${IUSE} graphite" - fi - fi - - # Support upgrade paths here or people get pissed - if use multislot ; then - SLOT="${CTARGET}-${GCC_CONFIG_VER}" - elif is_crosscompile; then - SLOT="${CTARGET}-${GCC_BRANCH_VER}" - else - SLOT="${GCC_BRANCH_VER}" - fi -fi -#----<< SLOT+IUSE logic >>---- - - -#---->> S + SRC_URI essentials <<---- - -# This function sets the source directory depending on whether we're using -# a prerelease, snapshot, or release tarball. To use it, just set S with: -# -# S="$(gcc_get_s_dir)" -# -# Travis Tilley <lv@gentoo.org> (03 Sep 2004) -# -gcc_get_s_dir() { - local GCC_S - if [[ -n ${PRERELEASE} ]] ; then - GCC_S=${WORKDIR}/gcc-${PRERELEASE} - elif [[ -n ${SNAPSHOT} ]] ; then - GCC_S=${WORKDIR}/gcc-${SNAPSHOT} - else - GCC_S=${WORKDIR}/gcc-${GCC_RELEASE_VER} - fi - echo "${GCC_S}" -} - -# This function handles the basics of setting the SRC_URI for a gcc ebuild. -# To use, set SRC_URI with: -# -# SRC_URI="$(get_gcc_src_uri)" -# -# Other than the variables normally set by portage, this function's behavior -# can be altered by setting the following: -# -# SNAPSHOT -# If set, this variable signals that we should be using a snapshot -# of gcc from ftp://sources.redhat.com/pub/gcc/snapshots/. It is -# expected to be in the format "YYYY-MM-DD". Note that if the ebuild -# has a _pre suffix, this variable is ignored and the prerelease -# tarball is used instead. -# -# BRANCH_UPDATE -# If set, this variable signals that we should be using the main -# release tarball (determined by ebuild version) and applying a -# CVS branch update patch against it. The location of this branch -# update patch is assumed to be in ${GENTOO_TOOLCHAIN_BASE_URI}. -# Just like with SNAPSHOT, this variable is ignored if the ebuild -# has a _pre suffix. -# -# PATCH_VER -# PATCH_GCC_VER -# This should be set to the version of the gentoo patch tarball. -# The resulting filename of this tarball will be: -# gcc-${PATCH_GCC_VER:-${GCC_RELEASE_VER}}-patches-${PATCH_VER}.tar.bz2 -# -# PIE_VER -# PIE_GCC_VER -# obsoleted: PIE_CORE -# These variables control patching in various updates for the logic -# controlling Position Independant Executables. PIE_VER is expected -# to be the version of this patch, PIE_GCC_VER the gcc version of -# the patch, and PIE_CORE (obsoleted) the actual filename of the patch. -# An example: -# PIE_VER="8.7.6.5" -# PIE_GCC_VER="3.4.0" -# The resulting filename of this tarball will be: -# gcc-${PIE_GCC_VER:-${GCC_RELEASE_VER}}-piepatches-v${PIE_VER}.tar.bz2 -# old syntax (do not define PIE_CORE anymore): -# PIE_CORE="gcc-3.4.0-piepatches-v${PIE_VER}.tar.bz2" -# -# SPECS_VER -# SPECS_GCC_VER -# This is for the minispecs files included in the hardened gcc-4.x -# -# PP_VER -# PP_GCC_VER -# obsoleted: PP_FVER -# These variables control patching in stack smashing protection -# support. They both control the version of ProPolice to download. -# -# PP_VER / PP_GCC_VER -# Used to roll our own custom tarballs of ssp. -# PP_FVER / PP_VER -# Used for mirroring ssp straight from IBM. -# PP_VER sets the version of the directory in which to find the -# patch, and PP_FVER sets the version of the patch itself. For -# example: -# PP_VER="3_4" -# PP_FVER="${PP_VER//_/.}-2" -# would download gcc3_4/protector-3.4-2.tar.gz -# -# HTB_VER -# HTB_GCC_VER -# These variables control whether or not an ebuild supports Herman -# ten Brugge's bounds-checking patches. If you want to use a patch -# for an older gcc version with a new gcc, make sure you set -# HTB_GCC_VER to that version of gcc. -# -# MAN_VER -# The version of gcc for which we will download manpages. This will -# default to ${GCC_RELEASE_VER}, but we may not want to pre-generate man pages -# for prerelease test ebuilds for example. This allows you to -# continue using pre-generated manpages from the last stable release. -# If set to "none", this will prevent the downloading of manpages, -# which is useful for individual library targets. -# -gentoo_urls() { - local devspace="HTTP~lv/GCC/URI HTTP~eradicator/gcc/URI HTTP~vapier/dist/URI - HTTP~halcy0n/patches/URI" - devspace=${devspace//HTTP/http:\/\/dev.gentoo.org\/} - echo mirror://gentoo/$1 ${devspace//URI/$1} -} -get_gcc_src_uri() { - export PATCH_GCC_VER=${PATCH_GCC_VER:-${GCC_RELEASE_VER}} - export UCLIBC_GCC_VER=${UCLIBC_GCC_VER:-${PATCH_GCC_VER}} - export PIE_GCC_VER=${PIE_GCC_VER:-${GCC_RELEASE_VER}} - export PP_GCC_VER=${PP_GCC_VER:-${GCC_RELEASE_VER}} - export HTB_GCC_VER=${HTB_GCC_VER:-${GCC_RELEASE_VER}} - export SPECS_GCC_VER=${SPECS_GCC_VER:-${GCC_RELEASE_VER}} - - [[ -n ${PIE_VER} ]] && \ - PIE_CORE=${PIE_CORE:-gcc-${PIE_GCC_VER}-piepatches-v${PIE_VER}.tar.bz2} - - # Set where to download gcc itself depending on whether we're using a - # prerelease, snapshot, or release tarball. - if [[ -n ${PRERELEASE} ]] ; then - GCC_SRC_URI="ftp://gcc.gnu.org/pub/gcc/prerelease-${PRERELEASE}/gcc-${PRERELEASE}.tar.bz2" - elif [[ -n ${SNAPSHOT} ]] ; then - GCC_SRC_URI="ftp://sources.redhat.com/pub/gcc/snapshots/${SNAPSHOT}/gcc-${SNAPSHOT}.tar.bz2" - else - GCC_SRC_URI="mirror://gnu/gcc/gcc-${GCC_PV}/gcc-${GCC_RELEASE_VER}.tar.bz2" - # we want all branch updates to be against the main release - [[ -n ${BRANCH_UPDATE} ]] && \ - GCC_SRC_URI="${GCC_SRC_URI} $(gentoo_urls gcc-${GCC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2)" - fi - - # propolice aka stack smashing protection - if [[ -n ${PP_VER} ]] ; then - if [[ -n ${PP_FVER} ]] ; then - GCC_SRC_URI="${GCC_SRC_URI} - !nossp? ( - http://www.research.ibm.com/trl/projects/security/ssp/gcc${PP_VER}/protector-${PP_FVER}.tar.gz - $(gentoo_urls protector-${PP_FVER}.tar.gz) - )" - else - GCC_SRC_URI="${GCC_SRC_URI} $(gentoo_urls gcc-${PP_GCC_VER}-ssp-${PP_VER}.tar.bz2)" - fi - fi - - # uclibc lovin - [[ -n ${UCLIBC_VER} ]] && \ - GCC_SRC_URI="${GCC_SRC_URI} $(gentoo_urls gcc-${UCLIBC_GCC_VER}-uclibc-patches-${UCLIBC_VER}.tar.bz2)" - - # PERL cannot be present at bootstrap, and is used to build the man pages. - # So... lets include some pre-generated ones, shall we? - [[ -n ${MAN_VER} ]] && \ - GCC_SRC_URI="${GCC_SRC_URI} $(gentoo_urls gcc-${MAN_VER}-manpages.tar.bz2)" - - # various gentoo patches - [[ -n ${PATCH_VER} ]] && \ - GCC_SRC_URI="${GCC_SRC_URI} $(gentoo_urls gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2)" - - # strawberry pie, Cappuccino and a Gauloises (it's a good thing) - [[ -n ${PIE_VER} ]] && \ - GCC_SRC_URI="${GCC_SRC_URI} !nopie? ( $(gentoo_urls ${PIE_CORE}) )" - - # espf patch for gcc >4.4.1 compiler. New hardened patchset - [[ -n ${ESPF_VER} ]] && \ - GCC_SRC_URI="${GCC_SRC_URI} ( $(gentoo_urls gcc-${GCC_RELEASE_VER}-espf-${ESPF_VER}.tar.bz2) - http://weaver.gentooenterprise.com/hardened/patches/gcc-${GCC_RELEASE_VER}-espf-${ESPF_VER}.tar.bz2 - )" - - # gcc minispec for the hardened gcc 4 compiler - [[ -n ${SPECS_VER} ]] && \ - GCC_SRC_URI="${GCC_SRC_URI} ( $(gentoo_urls gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.bz2) - http://weaver.gentooenterprise.com/hardened/patches/gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.bz2 - )" - - # gcc bounds checking patch - if [[ -n ${HTB_VER} ]] ; then - local HTBFILE="bounds-checking-gcc-${HTB_GCC_VER}-${HTB_VER}.patch.bz2" - GCC_SRC_URI="${GCC_SRC_URI} - boundschecking? ( - mirror://sourceforge/boundschecking/${HTBFILE} - $(gentoo_urls ${HTBFILE}) - )" - fi - - # support for the D language - [[ -n ${D_VER} ]] && \ - GCC_SRC_URI="${GCC_SRC_URI} d? ( mirror://sourceforge/dgcc/gdc-${D_VER}-src.tar.bz2 )" - - # >= gcc-4.3 uses ecj.jar and we only add gcj as a use flag under certain - # conditions - if [[ ${PN} != "kgcc64" && ${PN} != gcc-* ]] ; then - tc_version_is_at_least "4.3" && \ - GCC_SRC_URI="${GCC_SRC_URI} - gcj? ( ftp://sourceware.org/pub/java/ecj-4.3.jar )" - fi - - echo "${GCC_SRC_URI}" -} -S=$(gcc_get_s_dir) -SRC_URI=$(get_gcc_src_uri) -#---->> S + SRC_URI essentials >>---- - - -#---->> support checks <<---- - -# Grab a variable from the build system (taken from linux-info.eclass) -get_make_var() { - local var=$1 makefile=${2:-${WORKDIR}/build/Makefile} - echo -e "e:\\n\\t@echo \$(${var})\\ninclude ${makefile}" | \ - r=${makefile%/*} emake --no-print-directory -s -f - 2>/dev/null -} -XGCC() { get_make_var GCC_FOR_TARGET ; } - -# The gentoo piessp patches allow for 3 configurations: -# 1) PIE+SSP by default -# 2) PIE by default -# 3) SSP by default -hardened_gcc_works() { - if [[ $1 == "pie" ]] ; then - # $gcc_cv_ld_pie is unreliable as it simply take the output of - # `ld --help | grep -- -pie`, that reports the option in all cases, also if - # the loader doesn't actually load the resulting executables. - # To avoid breakage, blacklist FreeBSD here at least - [[ ${CTARGET} == *-freebsd* ]] && return 1 - - want_pie || return 1 - hardened_gcc_is_stable pie && return 0 - if has "~$(tc-arch)" ${ACCEPT_KEYWORDS} ; then - hardened_gcc_check_unsupported pie && return 1 - ewarn "Allowing pie-by-default for an unstable arch ($(tc-arch))" - return 0 - fi - return 1 - elif [[ $1 == "ssp" ]] ; then - [[ -z ${PP_VER} ]] && return 1 - hardened_gcc_is_stable ssp && return 0 - if has "~$(tc-arch)" ${ACCEPT_KEYWORDS} ; then - hardened_gcc_check_unsupported ssp && return 1 - ewarn "Allowing ssp-by-default for an unstable arch ($(tc-arch))" - return 0 - fi - return 1 - else - # laziness ;) - hardened_gcc_works pie || return 1 - hardened_gcc_works ssp || return 1 - return 0 - fi -} - -hardened_gcc_is_stable() { - if [[ $1 == "pie" ]] ; then - # HARDENED_* variables are deprecated and here for compatibility - local tocheck="${HARDENED_PIE_WORKS} ${HARDENED_GCC_WORKS}" - if [[ ${CTARGET} == *-uclibc* ]] ; then - tocheck="${tocheck} ${PIE_UCLIBC_STABLE}" - else - tocheck="${tocheck} ${PIE_GLIBC_STABLE}" - fi - elif [[ $1 == "ssp" ]] ; then - # ditto - local tocheck="${HARDENED_SSP_WORKS} ${HARDENED_GCC_WORKS}" - if [[ ${CTARGET} == *-uclibc* ]] ; then - tocheck="${tocheck} ${SSP_UCLIBC_STABLE}" - else - tocheck="${tocheck} ${SSP_STABLE}" - fi - else - die "hardened_gcc_stable needs to be called with pie or ssp" - fi - - hasq $(tc-arch) ${tocheck} && return 0 - return 1 -} - -hardened_gcc_check_unsupported() { - local tocheck="" - # if a variable is unset, we assume that all archs are unsupported. since - # this function is never called if hardened_gcc_is_stable returns true, - # this shouldn't cause problems... however, allowing this logic to work - # even with the variables unset will break older ebuilds that dont use them. - if [[ $1 == "pie" ]] ; then - if [[ ${CTARGET} == *-uclibc* ]] ; then - [[ -z ${PIE_UCLIBC_UNSUPPORTED} ]] && return 0 - tocheck="${tocheck} ${PIE_UCLIBC_UNSUPPORTED}" - else - [[ -z ${PIE_GLIBC_UNSUPPORTED} ]] && return 0 - tocheck="${tocheck} ${PIE_GLIBC_UNSUPPORTED}" - fi - elif [[ $1 == "ssp" ]] ; then - if [[ ${CTARGET} == *-uclibc* ]] ; then - [[ -z ${SSP_UCLIBC_UNSUPPORTED} ]] && return 0 - tocheck="${tocheck} ${SSP_UCLIBC_UNSUPPORTED}" - else - [[ -z ${SSP_UNSUPPORTED} ]] && return 0 - tocheck="${tocheck} ${SSP_UNSUPPORTED}" - fi - else - die "hardened_gcc_check_unsupported needs to be called with pie or ssp" - fi - - hasq $(tc-arch) ${tocheck} && return 0 - return 1 -} - -espf_arch_support() { - if [[ ${CTARGET} == *-uclibc* ]] && has $(tc-arch) ${ESPF_UCLIBC_SUPPORT} || has $(tc-arch) ${ESPF_GLIBC_SUPPORT} ; then - return 0 - else - return 1 - fi -} - -has_libssp() { - [[ -e /$(get_libdir)/libssp.so ]] && return 0 - return 1 -} - -want_libssp() { - [[ ${GCC_LIBSSP_SUPPORT} == "true" ]] || return 1 - has_libssp || return 1 - [[ -n ${PP_VER} ]] || return 1 - return 0 -} - -_want_stuff() { - local var=$1 flag=$2 - [[ -z ${!var} ]] && return 1 - use ${flag} && return 0 - return 1 -} -want_boundschecking() { _want_stuff HTB_VER boundschecking ; } -want_pie() { _want_stuff PIE_VER !nopie ; } -want_ssp() { _want_stuff PP_VER !nossp ; } - -want_split_specs() { - [[ ${SPLIT_SPECS} == "true" ]] && want_pie -} -want_minispecs() { - if tc_version_is_at_least 4.3.2 && use hardened ; then - [[ -n ${SPECS_VER} ]] && want_pie && return 0 - [[ -n ${ESPF_VER} ]] && [[ -n ${SPECS_VER} ]] && return 1 - die "For Hardened to work you need the minispecs files and have the PIE patch" - fi - return 1 -} -want_espf() { - if tc_version_is_at_least 4.3.4 && use hardened ; then - [[ -n ${ESPF_VER} ]] && [[ -n ${SPECS_VER} ]] && return 0 - die "For Hardened to work you need the minispecs files and have the espf patch" - fi - return 1 -} -# This function checks whether or not glibc has the support required to build -# Position Independant Executables with gcc. -glibc_have_pie() { - if [[ ! -f ${ROOT}/usr/$(get_libdir)/Scrt1.o ]] ; then - echo - ewarn "Your glibc does not have support for pie, the file Scrt1.o is missing" - ewarn "Please update your glibc to a proper version or disable hardened" - echo - return 1 - fi -} - -# This function determines whether or not libc has been patched with stack -# smashing protection support. -libc_has_ssp() { - [[ ${ROOT} != "/" ]] && return 0 - - # lib hacks taken from sandbox configure - echo 'int main(){}' > "${T}"/libctest.c - LC_ALL=C gcc "${T}"/libctest.c -lc -o libctest -Wl,-verbose &> "${T}"/libctest.log || return 1 - local libc_file=$(awk '/attempt to open/ { if (($4 ~ /\/libc\.so/) && ($5 == "succeeded")) LIBC = $4; }; END {print LIBC}' "${T}"/libctest.log) - - [[ -z ${libc_file} ]] && die "Unable to find a libc !?" - - # Check for gcc-4.x style ssp support - if [[ -n $(readelf -s "${libc_file}" 2>/dev/null | \ - grep 'FUNC.*GLOBAL.*__stack_chk_fail') ]] - then - return 0 - else - # Check for gcc-3.x style ssp support - if [[ -n $(readelf -s "${libc_file}" 2>/dev/null | \ - grep 'OBJECT.*GLOBAL.*__guard') ]] && \ - [[ -n $(readelf -s "${libc_file}" 2>/dev/null | \ - grep 'FUNC.*GLOBAL.*__stack_smash_handler') ]] - then - return 0 - elif is_crosscompile ; then - die "'${libc_file}' was detected w/out ssp, that sucks (a lot)" - else - return 1 - fi - fi -} - -# This is to make sure we don't accidentally try to enable support for a -# language that doesnt exist. GCC 3.4 supports f77, while 4.0 supports f95, etc. -# -# Also add a hook so special ebuilds (kgcc64) can control which languages -# exactly get enabled -gcc-lang-supported() { - grep ^language=\"${1}\" "${S}"/gcc/*/config-lang.in > /dev/null || return 1 - [[ -z ${TOOLCHAIN_ALLOWED_LANGS} ]] && return 0 - has $1 ${TOOLCHAIN_ALLOWED_LANGS} -} - -#----<< support checks >>---- - -#---->> specs + env.d logic <<---- - -# defaults to enable for all hardened toolchains -gcc_common_hard="-DEFAULT_RELRO -DEFAULT_BIND_NOW" - -# configure to build with the hardened GCC specs as the default -make_gcc_hard() { - if hardened_gcc_works ; then - einfo "Updating gcc to use automatic PIE + SSP building ..." - sed -e "s|^HARD_CFLAGS = |HARD_CFLAGS = -DEFAULT_PIE_SSP ${gcc_common_hard} |" \ - -i "${S}"/gcc/Makefile.in || die "Failed to update gcc!" - elif hardened_gcc_works pie ; then - einfo "Updating gcc to use automatic PIE building ..." - ewarn "SSP has not been enabled by default" - sed -e "s|^HARD_CFLAGS = |HARD_CFLAGS = -DEFAULT_PIE ${gcc_common_hard} |" \ - -i "${S}"/gcc/Makefile.in || die "Failed to update gcc!" - elif hardened_gcc_works ssp ; then - einfo "Updating gcc to use automatic SSP building ..." - ewarn "PIE has not been enabled by default" - sed -e "s|^HARD_CFLAGS = |HARD_CFLAGS = -DEFAULT_SSP ${gcc_common_hard} |" \ - -i "${S}"/gcc/Makefile.in || die "Failed to update gcc!" - else - # do nothing if hardened isnt supported, but dont die either - ewarn "hardened is not supported for this arch in this gcc version" - ebeep - return 0 - fi - - # rebrand to make bug reports easier - BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} -} - -# now we generate different spec files so that the user can select a compiler -# that enforces certain features in gcc itself and so we don't have to worry -# about a certain package ignoring CFLAGS/LDFLAGS -_create_specs_file() { - # Usage: _create_specs_file <USE flag> <specs name> <CFLAGS> - local uflag=$1 name=$2 flags=${*:3} - ebegin "Creating a ${name} gcc specs file" - pushd "${WORKDIR}"/build/gcc > /dev/null - if [[ -z ${uflag} ]] || use ${uflag} ; then - # backup the compiler first - cp Makefile Makefile.orig - sed -i -e '/^HARD_CFLAGS/s:=.*:='"${flags}"':' Makefile - mv xgcc xgcc.foo - mv gcc.o gcc.o.foo - emake -s xgcc - $(XGCC) -dumpspecs > "${WORKDIR}"/build/${name}.specs - # restore everything to normal - mv gcc.o.foo gcc.o - mv xgcc.foo xgcc - mv Makefile.orig Makefile - else - $(XGCC) -dumpspecs > "${WORKDIR}"/build/${name}.specs - fi - popd > /dev/null - eend $([[ -s ${WORKDIR}/build/${name}.specs ]] ; echo $?) -} -create_vanilla_specs_file() { _create_specs_file hardened vanilla ; } -create_hardened_specs_file() { _create_specs_file !hardened hardened ${gcc_common_hard} -DEFAULT_PIE_SSP ; } -create_hardenednossp_specs_file() { _create_specs_file "" hardenednossp ${gcc_common_hard} -DEFAULT_PIE ; } -create_hardenednopie_specs_file() { _create_specs_file "" hardenednopie ${gcc_common_hard} -DEFAULT_SSP ; } -create_hardenednopiessp_specs_file() { _create_specs_file "" hardenednopiessp ${gcc_common_hard} ; } - -split_out_specs_files() { - local s spec_list="hardenednopiessp vanilla" - if hardened_gcc_works ; then - spec_list="${spec_list} hardened hardenednossp hardenednopie" - elif hardened_gcc_works pie ; then - spec_list="${spec_list} hardenednossp" - elif hardened_gcc_works ssp ; then - spec_list="${spec_list} hardenednopie" - fi - for s in ${spec_list} ; do - create_${s}_specs_file || return 1 - done -} - -create_gcc_env_entry() { - dodir /etc/env.d/gcc - local gcc_envd_base="/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}" - - if [[ -z $1 ]] ; then - gcc_envd_file="${D}${gcc_envd_base}" - # I'm leaving the following commented out to remind me that it - # was an insanely -bad- idea. Stuff broke. GCC_SPECS isnt unset - # on chroot or in non-toolchain.eclass gcc ebuilds! - #gcc_specs_file="${LIBPATH}/specs" - gcc_specs_file="" - else - gcc_envd_file="${D}${gcc_envd_base}-$1" - gcc_specs_file="${LIBPATH}/$1.specs" - fi - - # phase PATH/ROOTPATH out ... - echo "PATH=\"${BINPATH}\"" > ${gcc_envd_file} - echo "ROOTPATH=\"${BINPATH}\"" >> ${gcc_envd_file} - echo "GCC_PATH=\"${BINPATH}\"" >> ${gcc_envd_file} - - if use multilib && ! has_multilib_profile; then - LDPATH="${LIBPATH}" - for path in 32 64 ; do - [[ -d ${LIBPATH}/${path} ]] && LDPATH="${LDPATH}:${LIBPATH}/${path}" - done - else - local MULTIDIR - LDPATH="${LIBPATH}" - - # We want to list the default ABI's LIBPATH first so libtool - # searches that directory first. This is a temporary - # workaround for libtool being stupid and using .la's from - # conflicting ABIs by using the first one in the search path - - local abi=${DEFAULT_ABI} - local MULTIDIR=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory) - if [[ ${MULTIDIR} == "." ]] ; then - LDPATH=${LIBPATH} - else - LDPATH=${LIBPATH}/${MULTIDIR} - fi - - for abi in $(get_all_abis) ; do - [[ ${abi} == ${DEFAULT_ABI} ]] && continue - - MULTIDIR=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory) - if [[ ${MULTIDIR} == "." ]] ; then - LDPATH=${LDPATH}:${LIBPATH} - else - LDPATH=${LDPATH}:${LIBPATH}/${MULTIDIR} - fi - done - fi - - echo "LDPATH=\"${LDPATH}\"" >> ${gcc_envd_file} - echo "MANPATH=\"${DATAPATH}/man\"" >> ${gcc_envd_file} - echo "INFOPATH=\"${DATAPATH}/info\"" >> ${gcc_envd_file} - echo "STDCXX_INCDIR=\"${STDCXX_INCDIR##*/}\"" >> ${gcc_envd_file} - - is_crosscompile && echo "CTARGET=${CTARGET}" >> ${gcc_envd_file} - - # Set which specs file to use - [[ -n ${gcc_specs_file} ]] && echo "GCC_SPECS=\"${gcc_specs_file}\"" >> ${gcc_envd_file} -} -setup_minispecs_gcc_build_specs() { - # Setup the "build.specs" file for gcc to use when building. - if want_minispecs ; then - if hardened_gcc_works pie ; then - cat "${WORKDIR}"/specs/pie.specs >> "${WORKDIR}"/build.specs - fi - for s in nostrict znow; do - cat "${WORKDIR}"/specs/${s}.specs >> "${WORKDIR}"/build.specs - done - export GCC_SPECS="${WORKDIR}"/build.specs - fi -} -copy_minispecs_gcc_specs() { - # Build system specs file which, if it exists, must be a complete set of - # specs as it completely and unconditionally overrides the builtin specs. - # For gcc 4 - if want_minispecs ; then - $(XGCC) -dumpspecs > "${WORKDIR}"/specs/specs - cat "${WORKDIR}"/build.specs >> "${WORKDIR}"/specs/specs - insinto ${LIBPATH} - doins "${WORKDIR}"/specs/* || die "failed to install specs" - fi - if want_espf ; then - insinto ${LIBPATH} - doins "${WORKDIR}"/specs/* || die "failed to install specs" - fi -} -add_profile_eselect_conf() { - local compiler_config_file=$1 - local abi=$2 - local specs=$3 - local gcc_specs_file - local var - - if [[ -z ${specs} ]] ; then - # I'm leaving the following commented out to remind me that it - # was an insanely -bad- idea. Stuff broke. GCC_SPECS isnt unset - # on chroot or in non-toolchain.eclass gcc ebuilds! - #gcc_specs_file="${LIBPATH}/specs" - gcc_specs_file="" - - if use hardened ; then - specs="hardened" - else - specs="vanilla" - fi - else - gcc_specs_file="${LIBPATH}/${specs}.specs" - fi - - echo >> ${compiler_config_file} - if ! is_multilib ; then - echo "[${specs}]" >> ${compiler_config_file} - echo " ctarget=${CTARGET}" >> ${compiler_config_file} - else - echo "[${abi}-${specs}]" >> ${compiler_config_file} - var="CTARGET_${abi}" - if [[ -n ${!var} ]] ; then - echo " ctarget=${!var}" >> ${compiler_config_file} - else - var="CHOST_${abi}" - if [[ -n ${!var} ]] ; then - echo " ctarget=${!var}" >> ${compiler_config_file} - else - echo " ctarget=${CTARGET}" >> ${compiler_config_file} - fi - fi - fi - - local MULTIDIR=$($(XGCC) $(get_abi_CFLAGS ${abi}) --print-multi-directory) - local LDPATH=${LIBPATH} - if [[ ${MULTIDIR} != "." ]] ; then - LDPATH="${LIBPATH}/${MULTIDIR}" - fi - - echo " ldpath=${LDPATH}" >> ${compiler_config_file} - - if [[ -n ${gcc_specs_file} ]] ; then - echo " specs=${gcc_specs_file}" >> ${compiler_config_file} - fi - - var="CFLAGS_${abi}" - if [[ -n ${!var} ]] ; then - echo " cflags=${!var}" >> ${compiler_config_file} - fi -} - -create_eselect_conf() { - local config_dir="/etc/eselect/compiler" - local compiler_config_file="${D}/${config_dir}/${CTARGET}-${GCC_CONFIG_VER}.conf" - local abi - - dodir ${config_dir} - - echo "[global]" > ${compiler_config_file} - echo " version=${CTARGET}-${GCC_CONFIG_VER}" >> ${compiler_config_file} - echo " binpath=${BINPATH}" >> ${compiler_config_file} - echo " manpath=${DATAPATH}/man" >> ${compiler_config_file} - echo " infopath=${DATAPATH}/info" >> ${compiler_config_file} - echo " alias_cc=gcc" >> ${compiler_config_file} - echo " stdcxx_incdir=${STDCXX_INCDIR##*/}" >> ${compiler_config_file} - echo " bin_prefix=${CTARGET}" >> ${compiler_config_file} - - # Per spyderous, it is best not to alias the fortran compilers - #if [[ -x "${D}/${BINPATH}/${CTARGET}-g77" ]] ; then - # echo " alias_gfortran=g77" >> ${compiler_config_file} - #elif [[ -x "${D}/${BINPATH}/${CTARGET}-gfortran" ]] ; then - # echo " alias_g77=gfortran" >> ${compiler_config_file} - #fi - - for abi in $(get_all_abis) ; do - add_profile_eselect_conf "${compiler_config_file}" "${abi}" - - if want_split_specs ; then - if use hardened ; then - add_profile_eselect_conf "${compiler_config_file}" "${abi}" vanilla - elif hardened_gcc_works ; then - add_profile_eselect_conf "${compiler_config_file}" "${abi}" hardened - fi - - if hardened_gcc_works || hardened_gcc_works pie ; then - add_profile_eselect_conf "${compiler_config_file}" "${abi}" hardenednossp - fi - - if hardened_gcc_works || hardened_gcc_works ssp ; then - add_profile_eselect_conf "${compiler_config_file}" "${abi}" hardenednopie - fi - - add_profile_eselect_conf "${compiler_config_file}" "${abi}" hardenednopiessp - fi - done -} - -#----<< specs + env.d logic >>---- - -#---->> pkg_* <<---- -gcc_pkg_setup() { - [[ -z ${ETYPE} ]] && die "Your ebuild needs to set the ETYPE variable" - - if [[ ( $(tc-arch) == "amd64" || $(tc-arch) == "ppc64" ) && ( ${LD_PRELOAD} == "/lib/libsandbox.so" || ${LD_PRELOAD} == "/usr/lib/libsandbox.so" ) ]] && is_multilib ; then - eerror "Sandbox in your installed portage does not support compilation." - eerror "of a multilib gcc. Please set FEATURES=-sandbox and try again." - eerror "After you have a multilib gcc, re-emerge portage to have a working sandbox." - die "No 32bit sandbox. Retry with FEATURES=-sandbox." - fi - - if [[ ${ETYPE} == "gcc-compiler" ]] ; then - case $(tc-arch) in - mips) - # Must compile for mips64-linux target if we want n32/n64 support - case "${CTARGET}" in - mips64*) ;; - *) - if use n32 || use n64; then - eerror "n32/n64 can only be used when target host is mips64*-*-linux-*"; - die "Invalid USE flags for CTARGET ($CTARGET)"; - fi - ;; - esac - - #cannot have both n32 & n64 without multilib - if use n32 && use n64 && ! is_multilib; then - eerror "Please enable multilib if you want to use both n32 & n64"; - die "Invalid USE flag combination"; - fi - ;; - esac - - # Setup variables which would normally be in the profile - if is_crosscompile ; then - multilib_env ${CTARGET} - if ! use multilib ; then - MULTILIB_ABIS=${DEFAULT_ABI} - fi - fi - - # we dont want to use the installed compiler's specs to build gcc! - unset GCC_SPECS - fi - - want_libssp && libc_has_ssp && \ - die "libssp cannot be used with a glibc that has been patched to provide ssp symbols" - - unset LANGUAGES #265283 -} - -gcc-compiler_pkg_preinst() { - : -} - -gcc-compiler_pkg_postinst() { - if has_version 'app-admin/eselect-compiler' ; then - do_eselect_compiler - else - do_gcc_config - fi - - if ! is_crosscompile ; then - echo - ewarn "If you have issues with packages unable to locate libstdc++.la," - ewarn "then try running 'fix_libtool_files.sh' on the old gcc versions." - echo - fi - - # If our gcc-config version doesn't like '-' in it's version string, - # tell our users that gcc-config will yell at them, but it's all good. - if ! has_version '>=sys-devel/gcc-config-1.3.10-r1' && [[ ${GCC_CONFIG_VER/-/} != ${GCC_CONFIG_VER} ]] ; then - ewarn "Your version of gcc-config will issue about having an invalid profile" - ewarn "when switching to this profile. It is safe to ignore this warning," - ewarn "and this problem has been corrected in >=sys-devel/gcc-config-1.3.10-r1." - fi - - if ! is_crosscompile && ! use multislot && [[ ${GCCMAJOR}.${GCCMINOR} == 3.4 ]] ; then - echo - ewarn "You should make sure to rebuild all your C++ packages when" - ewarn "upgrading between different versions of gcc. For example," - ewarn "when moving to gcc-3.4 from gcc-3.3, emerge gentoolkit and run:" - ewarn " # revdep-rebuild --library libstdc++.so.5" - echo - ewarn "For more information on the steps to take when upgrading " - ewarn "from gcc-3.3 please refer to: " - ewarn "http://www.gentoo.org/doc/en/gcc-upgrading.xml" - echo - fi - - if ! is_crosscompile ; then - # hack to prevent collisions between SLOT - [[ ! -d ${ROOT}/lib/rcscripts/awk ]] \ - && mkdir -p "${ROOT}"/lib/rcscripts/awk - [[ ! -d ${ROOT}/sbin ]] \ - && mkdir -p "${ROOT}"/sbin - cp "${ROOT}/${DATAPATH}"/fixlafiles.awk "${ROOT}"/lib/rcscripts/awk/ || die "installing fixlafiles.awk" - cp "${ROOT}/${DATAPATH}"/fix_libtool_files.sh "${ROOT}"/sbin/ || die "installing fix_libtool_files.sh" - - [[ ! -d ${ROOT}/usr/bin ]] \ - && mkdir -p "${ROOT}"/usr/bin - # Since these aren't critical files and portage sucks with - # handling of binpkgs, don't require these to be found - for x in "${ROOT}/${DATAPATH}"/c{89,99} ; do - if [[ -e ${x} ]]; then - cp ${x} "${ROOT}"/usr/bin/ || die "installing c89/c99" - fi - done - fi -} - -gcc-compiler_pkg_prerm() { - # Don't let these files be uninstalled #87647 - touch -c "${ROOT}"/sbin/fix_libtool_files.sh \ - "${ROOT}"/lib/rcscripts/awk/fixlafiles.awk -} - -gcc-compiler_pkg_postrm() { - # to make our lives easier (and saner), we do the fix_libtool stuff here. - # rather than checking SLOT's and trying in upgrade paths, we just see if - # the common libstdc++.la exists in the ${LIBPATH} of the gcc that we are - # unmerging. if it does, that means this was a simple re-emerge. - - # clean up the cruft left behind by cross-compilers - if is_crosscompile ; then - if [[ -z $(ls "${ROOT}"/etc/env.d/gcc/${CTARGET}* 2>/dev/null) ]] ; then - rm -f "${ROOT}"/etc/env.d/gcc/config-${CTARGET} - rm -f "${ROOT}"/etc/env.d/??gcc-${CTARGET} - rm -f "${ROOT}"/usr/bin/${CTARGET}-{gcc,{g,c}++}{,32,64} - fi - return 0 - fi - - # ROOT isnt handled by the script - [[ ${ROOT} != "/" ]] && return 0 - - if [[ ! -e ${LIBPATH}/libstdc++.so ]] ; then - einfo "Running 'fix_libtool_files.sh ${GCC_RELEASE_VER}'" - /sbin/fix_libtool_files.sh ${GCC_RELEASE_VER} - if [[ -n ${BRANCH_UPDATE} ]] ; then - einfo "Running 'fix_libtool_files.sh ${GCC_RELEASE_VER}-${BRANCH_UPDATE}'" - /sbin/fix_libtool_files.sh ${GCC_RELEASE_VER}-${BRANCH_UPDATE} - fi - fi - - return 0 -} - -#---->> pkg_* <<---- - -#---->> src_* <<---- - -# generic GCC src_unpack, to be called from the ebuild's src_unpack. -# BIG NOTE regarding hardened support: ebuilds with support for hardened are -# expected to export the following variable: -# -# HARDENED_GCC_WORKS -# This variable should be set to the archs on which hardened should -# be allowed. For example: HARDENED_GCC_WORKS="x86 sparc amd64" -# This allows for additional archs to be supported by hardened when -# ready. -# -# Travis Tilley <lv@gentoo.org> (03 Sep 2004) -# -gcc-compiler_src_unpack() { - # For the old gcc < 3.4 - if ! tc_version_is_at_least 4.3 ; then - # Fail if using pie patches, building hardened, and glibc doesn't have - # the necessary support - want_pie && use hardened && glibc_have_pie - einfo "updating configuration to build hardened GCC-3 style" - make_gcc_hard || die "failed to make gcc hard" - fi - - # For the newer gcc > 3.4 - if tc_version_is_at_least 4.3.2 && use hardened ; then - if [[ ${PIE_VER} ]] ; then - glibc_have_pie || die "failed to make gcc hardened" - fi - if [[ ${ESPF_VER} ]] ; then - espf_arch_support || die "ESPF is not supported on this $(tc-arch) arch." - fi - # Rebrand to make bug reports easier - use hardened && BRANDING_GCC_PKGVERSION=${BRANDING_GCC_PKGVERSION/Gentoo/Gentoo Hardened} - fi - - if is_libffi ; then - # move the libffi target out of gcj and into all - sed -i \ - -e '/^libgcj=/s:target-libffi::' \ - -e '/^target_lib/s:=":="target-libffi :' \ - "${S}"/configure || die - fi -} -gcc-library_src_unpack() { - : -} -guess_patch_type_in_dir() { - [[ -n $(ls "$1"/*.bz2 2>/dev/null) ]] \ - && EPATCH_SUFFIX="patch.bz2" \ - || EPATCH_SUFFIX="patch" -} -do_gcc_rename_java_bins() { - # bug #139918 - conflict between gcc and java-config-2 for ownership of - # /usr/bin/rmi{c,registry}. Done with mv & sed rather than a patch - # because patches would be large (thanks to the rename of man files), - # and it's clear from the sed invocations that all that changes is the - # rmi{c,registry} names to grmi{c,registry} names. - # Kevin F. Quinn 2006-07-12 - einfo "Renaming jdk executables rmic and rmiregistry to grmic and grmiregistry." - # 1) Move the man files if present (missing prior to gcc-3.4) - for manfile in rmic rmiregistry; do - [[ -f ${S}/gcc/doc/${manfile}.1 ]] || continue - mv "${S}"/gcc/doc/${manfile}.1 "${S}"/gcc/doc/g${manfile}.1 - done - # 2) Fixup references in the docs if present (mission prior to gcc-3.4) - for jfile in gcc/doc/gcj.info gcc/doc/grmic.1 gcc/doc/grmiregistry.1 gcc/java/gcj.texi; do - [[ -f ${S}/${jfile} ]] || continue - sed -i -e 's:rmiregistry:grmiregistry:g' "${S}"/${jfile} || - die "Failed to fixup file ${jfile} for rename to grmiregistry" - sed -i -e 's:rmic:grmic:g' "${S}"/${jfile} || - die "Failed to fixup file ${jfile} for rename to grmic" - done - # 3) Fixup Makefiles to build the changed executable names - # These are present in all 3.x versions, and are the important bit - # to get gcc to build with the new names. - for jfile in libjava/Makefile.am libjava/Makefile.in gcc/java/Make-lang.in; do - sed -i -e 's:rmiregistry:grmiregistry:g' "${S}"/${jfile} || - die "Failed to fixup file ${jfile} for rename to grmiregistry" - # Careful with rmic on these files; it's also the name of a directory - # which should be left unchanged. Replace occurrences of 'rmic$', - # 'rmic_' and 'rmic '. - sed -i -e 's:rmic\([$_ ]\):grmic\1:g' "${S}"/${jfile} || - die "Failed to fixup file ${jfile} for rename to grmic" - done -} -gcc_src_unpack() { - export BRANDING_GCC_PKGVERSION="Gentoo ${GCC_PVR}" - - [[ -z ${UCLIBC_VER} ]] && [[ ${CTARGET} == *-uclibc* ]] && die "Sorry, this version does not support uClibc" - - gcc_quick_unpack - exclude_gcc_patches - - cd "${S}" - - if ! use vanilla ; then - if [[ -n ${PATCH_VER} ]] ; then - guess_patch_type_in_dir "${WORKDIR}"/patch - EPATCH_MULTI_MSG="Applying Gentoo patches ..." \ - epatch "${WORKDIR}"/patch - BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION} p${PATCH_VER}" - fi - if [[ -n ${UCLIBC_VER} ]] ; then - guess_patch_type_in_dir "${WORKDIR}"/uclibc - EPATCH_MULTI_MSG="Applying uClibc patches ..." \ - epatch "${WORKDIR}"/uclibc - fi - fi - do_gcc_HTB_patches - do_gcc_SSP_patches - do_gcc_PIE_patches - epatch_user - do_gcc_ESPF_patches - - ${ETYPE}_src_unpack || die "failed to ${ETYPE}_src_unpack" - - # protoize don't build on FreeBSD, skip it - ## removed in 4.5, bug #270558 --de. - if [[ ${GCCMAJOR}.${GCCMINOR} < 4.5 ]]; then - if ! is_crosscompile && ! use elibc_FreeBSD ; then - # enable protoize / unprotoize - sed -i -e '/^LANGUAGES =/s:$: proto:' "${S}"/gcc/Makefile.in - fi - fi - - fix_files="" - for x in contrib/test_summary libstdc++-v3/scripts/check_survey.in ; do - [[ -e ${x} ]] && fix_files="${fix_files} ${x}" - done - ht_fix_file ${fix_files} */configure *.sh */Makefile.in - - if ! is_crosscompile && is_multilib && \ - [[ ( $(tc-arch) == "amd64" || $(tc-arch) == "ppc64" ) && -z ${SKIP_MULTILIB_HACK} ]] ; then - disgusting_gcc_multilib_HACK || die "multilib hack failed" - fi - - gcc_version_patch - if [[ ${GCCMAJOR}.${GCCMINOR} > 4.0 ]] ; then - if [[ -n ${SNAPSHOT} || -n ${PRERELEASE} ]] ; then - echo ${PV/_/-} > "${S}"/gcc/BASE-VER - echo "" > "${S}"/gcc/DATESTAMP - fi - fi - - # >= gcc-4.3 doesn't bundle ecj.jar, so copy it - if [[ ${GCCMAJOR}.${GCCMINOR} > 4.2 ]] && - use gcj ; then - cp -pPR "${DISTDIR}/ecj-4.3.jar" "${S}/ecj.jar" || die - fi - - # disable --as-needed from being compiled into gcc specs - # natively when using a gcc version < 3.4.4 - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14992 - if ! tc_version_is_at_least 3.4.4 ; then - sed -i -e s/HAVE_LD_AS_NEEDED/USE_LD_AS_NEEDED/g "${S}"/gcc/config.in - fi - - # In gcc 3.3.x and 3.4.x, rename the java bins to gcc-specific names - # in line with gcc-4. - if [[ ${GCCMAJOR} == 3 ]] && - [[ ${GCCMINOR} -ge 3 ]] - then - do_gcc_rename_java_bins - fi - - # Fixup libtool to correctly generate .la files with portage - cd "${S}" - elibtoolize --portage --shallow --no-uclibc - - gnuconfig_update - - # update configure files - local f - einfo "Fixing misc issues in configure files" - tc_version_is_at_least 4.1 && epatch "${GCC_FILESDIR}"/gcc-configure-texinfo.patch - for f in $(grep -l 'autoconf version 2.13' $(find "${S}" -name configure)) ; do - ebegin " Updating ${f/${S}\/} [LANG]" - patch "${f}" "${GCC_FILESDIR}"/gcc-configure-LANG.patch >& "${T}"/configure-patch.log \ - || eerror "Please file a bug about this" - eend $? - done - sed -i 's|A-Za-z0-9|[:alnum:]|g' "${S}"/gcc/*.awk #215828 - - if [[ -x contrib/gcc_update ]] ; then - einfo "Touching generated files" - ./contrib/gcc_update --touch | \ - while read f ; do - einfo " ${f%%...}" - done - fi - - disable_multilib_libjava || die "failed to disable multilib java" -} - -gcc-library-configure() { - # multilib support - [[ ${GCC_TARGET_NO_MULTILIB} == "true" ]] \ - && confgcc="${confgcc} --disable-multilib" \ - || confgcc="${confgcc} --enable-multilib" -} - -gcc-compiler-configure() { - # multilib support - if is_multilib ; then - confgcc="${confgcc} --enable-multilib" - elif [[ ${CTARGET} == *-linux* ]] ; then - confgcc="${confgcc} --disable-multilib" - fi - - if tc_version_is_at_least "4.0" ; then - if has mudflap ${IUSE} ; then - confgcc="${confgcc} $(use_enable mudflap libmudflap)" - else - confgcc="${confgcc} --disable-libmudflap" - fi - - if want_libssp ; then - confgcc="${confgcc} --enable-libssp" - else - export gcc_cv_libc_provides_ssp=yes - confgcc="${confgcc} --disable-libssp" - fi - - # If we want hardened support on newer espf-patchset - if want_espf ; then - confgcc="${confgcc} --enable-espf" - else - [[ ${ESPF_VER} ]] && confgcc="${confgcc} --disable-espf" - fi - - if tc_version_is_at_least "4.2" ; then - confgcc="${confgcc} $(use_enable openmp libgomp)" - fi - - # enable the cld workaround until we move things to stable. - # by that point, the rest of the software out there should - # have caught up. - if tc_version_is_at_least "4.3" ; then - if ! has ${ARCH} ${KEYWORDS} ; then - confgcc="${confgcc} --enable-cld" - fi - fi - - # Stick the python scripts in their own slotted directory - # bug #279252 - if tc_version_is_at_least "4.4" ; then - confgcc="${confgcc} --with-python-dir=${DATAPATH/$PREFIX/}/python" - fi - fi - - # GTK+ is preferred over xlib in 3.4.x (xlib is unmaintained - # right now). Much thanks to <csm@gnu.org> for the heads up. - # Travis Tilley <lv@gentoo.org> (11 Jul 2004) - if ! is_gcj ; then - confgcc="${confgcc} --disable-libgcj" - elif use gtk ; then - confgcc="${confgcc} --enable-java-awt=gtk" - fi - - case $(tc-arch) in - # Add --with-abi flags to set default MIPS ABI - mips) - local mips_abi="" - use n64 && mips_abi="--with-abi=64" - use n32 && mips_abi="--with-abi=n32" - [[ -n ${mips_abi} ]] && confgcc="${confgcc} ${mips_abi}" - ;; - # Default arch for x86 is normally i386, lets give it a bump - # since glibc will do so based on CTARGET anyways - x86) - confgcc="${confgcc} --with-arch=${CTARGET%%-*}" - ;; - # Enable sjlj exceptions for backward compatibility on hppa - hppa) - [[ ${GCCMAJOR} == "3" ]] && confgcc="${confgcc} --enable-sjlj-exceptions" - ;; - esac - - GCC_LANG="c" - is_cxx && GCC_LANG="${GCC_LANG},c++" - is_d && GCC_LANG="${GCC_LANG},d" - is_gcj && GCC_LANG="${GCC_LANG},java" - if is_objc || is_objcxx ; then - GCC_LANG="${GCC_LANG},objc" - if tc_version_is_at_least "4.0" ; then - use objc-gc && confgcc="${confgcc} --enable-objc-gc" - fi - is_objcxx && GCC_LANG="${GCC_LANG},obj-c++" - fi - is_treelang && GCC_LANG="${GCC_LANG},treelang" - - # fortran support just got sillier! the lang value can be f77 for - # fortran77, f95 for fortran95, or just plain old fortran for the - # currently supported standard depending on gcc version. - is_fortran && GCC_LANG="${GCC_LANG},fortran" - is_f77 && GCC_LANG="${GCC_LANG},f77" - is_f95 && GCC_LANG="${GCC_LANG},f95" - - # We do NOT want 'ADA support' in here! - # is_ada && GCC_LANG="${GCC_LANG},ada" - - einfo "configuring for GCC_LANG: ${GCC_LANG}" -} - -# Other than the variables described for gcc_setup_variables, the following -# will alter tha behavior of gcc_do_configure: -# -# CTARGET -# CBUILD -# Enable building for a target that differs from CHOST -# -# GCC_TARGET_NO_MULTILIB -# Disable multilib. Useful when building single library targets. -# -# GCC_LANG -# Enable support for ${GCC_LANG} languages. defaults to just "c" -# -# Travis Tilley <lv@gentoo.org> (04 Sep 2004) -# -gcc_do_configure() { - local confgcc - - # Set configuration based on path variables - confgcc="${confgcc} \ - --prefix=${PREFIX} \ - --bindir=${BINPATH} \ - --includedir=${INCLUDEPATH} \ - --datadir=${DATAPATH} \ - --mandir=${DATAPATH}/man \ - --infodir=${DATAPATH}/info \ - --with-gxx-include-dir=${STDCXX_INCDIR}" - # On Darwin we need libdir to be set in order to get correct install names - # for things like libobjc-gnu, libgcj and libfortran. If we enable it on - # non-Darwin we screw up the behaviour this eclass relies on. We in - # particular need this over --libdir for bug #255315. - [[ ${CHOST} == *-darwin* ]] && \ - confgcc="${confgcc} --enable-version-specific-runtime-libs" - - # All our cross-compile logic goes here ! woo ! - confgcc="${confgcc} --host=${CHOST}" - if is_crosscompile || tc-is-cross-compiler ; then - # Straight from the GCC install doc: - # "GCC has code to correctly determine the correct value for target - # for nearly all native systems. Therefore, we highly recommend you - # not provide a configure target when configuring a native compiler." - confgcc="${confgcc} --target=${CTARGET}" - fi - [[ -n ${CBUILD} ]] && confgcc="${confgcc} --build=${CBUILD}" - - # ppc altivec support - confgcc="${confgcc} $(use_enable altivec)" - - # gcc has fixed-point arithmetic support in 4.3 for mips targets that can - # significantly increase compile time by several hours. This will allow - # users to control this feature in the event they need the support. - tc_version_is_at_least "4.3" && confgcc="${confgcc} $(use_enable fixed-point)" - - # graphite support was added in 4.4, which depends upon external libraries - # for optimizations. This option allows users to determine if they want - # these optimizations and libraries pulled in - tc_version_is_at_least "4.4" && \ - confgcc="${confgcc} $(use_with graphite ppl) $(use_with graphite cloog)" - - - [[ $(tc-is-softfloat) == "yes" ]] && confgcc="${confgcc} --with-float=soft" - - # Native Language Support - if use nls ; then - confgcc="${confgcc} --enable-nls --without-included-gettext" - else - confgcc="${confgcc} --disable-nls" - fi - - # reasonably sane globals (hopefully) - confgcc="${confgcc} \ - --with-system-zlib \ - --disable-checking \ - --disable-werror \ - --enable-secureplt" - - # etype specific configuration - einfo "running ${ETYPE}-configure" - ${ETYPE}-configure || die - - # if not specified, assume we are building for a target that only - # requires C support - GCC_LANG=${GCC_LANG:-c} - confgcc="${confgcc} --enable-languages=${GCC_LANG}" - - if is_crosscompile ; then - # When building a stage1 cross-compiler (just C compiler), we have to - # disable a bunch of features or gcc goes boom - local needed_libc="" - case ${CTARGET} in - *-linux) needed_libc=no-fucking-clue;; - *-dietlibc) needed_libc=dietlibc;; - *-elf) needed_libc=newlib;; - *-freebsd*) needed_libc=freebsd-lib;; - *-gnu*) needed_libc=glibc;; - *-klibc) needed_libc=klibc;; - *-uclibc*) needed_libc=uclibc;; - *-cygwin) needed_libc=cygwin;; - mingw*|*-mingw*) needed_libc=mingw-runtime;; - avr) confgcc="${confgcc} --enable-shared --disable-threads";; - esac - if [[ -n ${needed_libc} ]] ; then - if ! has_version ${CATEGORY}/${needed_libc} ; then - confgcc="${confgcc} --disable-shared --disable-threads --without-headers" - elif built_with_use --hidden --missing false ${CATEGORY}/${needed_libc} crosscompile_opts_headers-only ; then - confgcc="${confgcc} --disable-shared --with-sysroot=${PREFIX}/${CTARGET}" - else - confgcc="${confgcc} --with-sysroot=${PREFIX}/${CTARGET}" - fi - fi - - if [[ ${GCCMAJOR}.${GCCMINOR} > 4.1 ]] ; then - confgcc="${confgcc} --disable-bootstrap --disable-libgomp" - fi - elif [[ ${CHOST} == mingw* ]] || [[ ${CHOST} == *-mingw* ]] || [[ ${CHOST} == *-cygwin ]] ; then - confgcc="${confgcc} --enable-shared --enable-threads=win32" - else - confgcc="${confgcc} --enable-shared --enable-threads=posix" - fi - [[ ${CTARGET} == *-elf ]] && confgcc="${confgcc} --with-newlib" - # __cxa_atexit is "essential for fully standards-compliant handling of - # destructors", but apparently requires glibc. - if [[ ${CTARGET} == *-uclibc* ]] ; then - confgcc="${confgcc} --disable-__cxa_atexit --enable-target-optspace $(use_enable nptl tls)" - [[ ${GCCMAJOR}.${GCCMINOR} == 3.3 ]] && confgcc="${confgcc} --enable-sjlj-exceptions" - if tc_version_is_at_least 3.4 && [[ ${GCCMAJOR}.${GCCMINOR} < 4.3 ]] ; then - confgcc="${confgcc} --enable-clocale=uclibc" - fi - elif [[ ${CTARGET} == *-gnu* ]] ; then - confgcc="${confgcc} --enable-__cxa_atexit" - confgcc="${confgcc} --enable-clocale=gnu" - elif [[ ${CTARGET} == *-freebsd* ]]; then - confgcc="${confgcc} --enable-__cxa_atexit" - elif [[ ${CTARGET} == *-solaris* ]]; then - confgcc="${confgcc} --enable-__cxa_atexit" - fi - [[ ${GCCMAJOR}.${GCCMINOR} < 3.4 ]] && confgcc="${confgcc} --disable-libunwind-exceptions" - - # create a sparc*linux*-{gcc,g++} that can handle -m32 and -m64 (biarch) - if [[ ${CTARGET} == sparc*linux* ]] \ - && is_multilib \ - && ! is_crosscompile \ - && [[ ${GCCMAJOR}.${GCCMINOR} > 4.2 ]] - then - confgcc="${confgcc} --enable-targets=all" - fi - - tc_version_is_at_least 4.3 && set -- "$@" \ - --with-bugurl=http://bugs.gentoo.org/ \ - --with-pkgversion="${BRANDING_GCC_PKGVERSION}" - set -- ${confgcc} "$@" ${EXTRA_ECONF} - - # Nothing wrong with a good dose of verbosity - echo - einfo "PREFIX: ${PREFIX}" - einfo "BINPATH: ${BINPATH}" - einfo "LIBPATH: ${LIBPATH}" - einfo "DATAPATH: ${DATAPATH}" - einfo "STDCXX_INCDIR: ${STDCXX_INCDIR}" - echo - einfo "Configuring GCC with: ${@//--/\n\t--}" - echo - - # Build in a separate build tree - mkdir -p "${WORKDIR}"/build - pushd "${WORKDIR}"/build > /dev/null - - # and now to do the actual configuration - addwrite /dev/zero - echo "${S}"/configure "$@" - "${S}"/configure "$@" || die "failed to run configure" - - # return to whatever directory we were in before - popd > /dev/null -} - -# This function accepts one optional argument, the make target to be used. -# If ommitted, gcc_do_make will try to guess whether it should use all, -# profiledbootstrap, or bootstrap-lean depending on CTARGET and arch. An -# example of how to use this function: -# -# gcc_do_make all-target-libstdc++-v3 -# -# In addition to the target to be used, the following variables alter the -# behavior of this function: -# -# LDFLAGS -# Flags to pass to ld -# -# STAGE1_CFLAGS -# CFLAGS to use during stage1 of a gcc bootstrap -# -# BOOT_CFLAGS -# CFLAGS to use during stages 2+3 of a gcc bootstrap. -# -# Travis Tilley <lv@gentoo.org> (04 Sep 2004) -# -gcc_do_make() { - # Fix for libtool-portage.patch - local OLDS=${S} - S=${WORKDIR}/build - - # Set make target to $1 if passed - [[ -n $1 ]] && GCC_MAKE_TARGET=$1 - # default target - if is_crosscompile || tc-is-cross-compiler ; then - # 3 stage bootstrapping doesnt quite work when you cant run the - # resulting binaries natively ^^; - GCC_MAKE_TARGET=${GCC_MAKE_TARGET-all} - else - GCC_MAKE_TARGET=${GCC_MAKE_TARGET-bootstrap-lean} - fi - - # the gcc docs state that parallel make isnt supported for the - # profiledbootstrap target, as collisions in profile collecting may occur. - [[ ${GCC_MAKE_TARGET} == "profiledbootstrap" ]] && export MAKEOPTS="${MAKEOPTS} -j1" - - # boundschecking seems to introduce parallel build issues - want_boundschecking && export MAKEOPTS="${MAKEOPTS} -j1" - - if [[ ${GCC_MAKE_TARGET} == "all" ]] ; then - STAGE1_CFLAGS=${STAGE1_CFLAGS-"${CFLAGS}"} - elif [[ $(gcc-version) == "3.4" && ${GCC_BRANCH_VER} == "3.4" ]] && gcc-specs-ssp ; then - # See bug #79852 - STAGE1_CFLAGS=${STAGE1_CFLAGS-"-O2"} - else - STAGE1_CFLAGS=${STAGE1_CFLAGS-"-O"} - fi - - if is_crosscompile; then - # In 3.4, BOOT_CFLAGS is never used on a crosscompile... - # but I'll leave this in anyways as someone might have had - # some reason for putting it in here... --eradicator - BOOT_CFLAGS=${BOOT_CFLAGS-"-O2"} - else - # we only want to use the system's CFLAGS if not building a - # cross-compiler. - BOOT_CFLAGS=${BOOT_CFLAGS-"$(get_abi_CFLAGS) ${CFLAGS}"} - fi - - pushd "${WORKDIR}"/build - - emake \ - LDFLAGS="${LDFLAGS}" \ - STAGE1_CFLAGS="${STAGE1_CFLAGS}" \ - LIBPATH="${LIBPATH}" \ - BOOT_CFLAGS="${BOOT_CFLAGS}" \ - ${GCC_MAKE_TARGET} \ - || die "emake failed with ${GCC_MAKE_TARGET}" - - if ! is_crosscompile && ! use nocxx && use doc ; then - if type -p doxygen > /dev/null ; then - if tc_version_is_at_least 4.3 ; then - cd "${CTARGET}"/libstdc++-v3/doc - emake doc-man-doxygen || ewarn "failed to make docs" - elif tc_version_is_at_least 3.0 ; then - cd "${CTARGET}"/libstdc++-v3 - emake doxygen-man || ewarn "failed to make docs" - fi - else - ewarn "Skipping libstdc++ manpage generation since you don't have doxygen installed" - fi - fi - - popd -} - -# This function will add ${GCC_CONFIG_VER} to the names of all shared libraries in the -# directory specified to avoid filename collisions between multiple slotted -# non-versioned gcc targets. If no directory is specified, it is assumed that -# you want -all- shared objects to have ${GCC_CONFIG_VER} added. Example -# -# add_version_to_shared ${D}/usr/$(get_libdir) -# -# Travis Tilley <lv@gentoo.org> (05 Sep 2004) -# -add_version_to_shared() { - local sharedlib sharedlibdir - [[ -z $1 ]] \ - && sharedlibdir=${D} \ - || sharedlibdir=$1 - - for sharedlib in $(find ${sharedlibdir} -name *.so.*) ; do - if [[ ! -L ${sharedlib} ]] ; then - einfo "Renaming `basename "${sharedlib}"` to `basename "${sharedlib/.so*/}-${GCC_CONFIG_VER}.so.${sharedlib/*.so./}"`" - mv "${sharedlib}" "${sharedlib/.so*/}-${GCC_CONFIG_VER}.so.${sharedlib/*.so./}" \ - || die - pushd `dirname "${sharedlib}"` > /dev/null || die - ln -sf "`basename "${sharedlib/.so*/}-${GCC_CONFIG_VER}.so.${sharedlib/*.so./}"`" \ - "`basename "${sharedlib}"`" || die - popd > /dev/null || die - fi - done -} - -# This is mostly a stub function to be overwritten in an ebuild -gcc_do_filter_flags() { - strip-flags - - # In general gcc does not like optimization, and add -O2 where - # it is safe. This is especially true for gcc 3.3 + 3.4 - replace-flags -O? -O2 - - # ... sure, why not? - strip-unsupported-flags - - # dont want to funk ourselves - filter-flags '-mabi*' -m31 -m32 -m64 - - case ${GCC_BRANCH_VER} in - 3.2|3.3) - replace-cpu-flags k8 athlon64 opteron i686 x86-64 - replace-cpu-flags pentium-m pentium3m pentium3 - case $(tc-arch) in - amd64|x86) filter-flags '-mtune=*' ;; - # in gcc 3.3 there is a bug on ppc64 where if -mcpu is used, - # the compiler wrongly assumes a 32bit target - ppc64) filter-flags "-mcpu=*";; - esac - case $(tc-arch) in - amd64) replace-cpu-flags core2 nocona;; - x86) replace-cpu-flags core2 prescott;; - esac - - replace-cpu-flags G3 750 - replace-cpu-flags G4 7400 - replace-cpu-flags G5 7400 - - # XXX: should add a sed or something to query all supported flags - # from the gcc source and trim everything else ... - filter-flags -f{no-,}unit-at-a-time -f{no-,}web -mno-tls-direct-seg-refs - filter-flags -f{no-,}stack-protector{,-all} - filter-flags -fvisibility-inlines-hidden -fvisibility=hidden - ;; - 3.4|4.*) - case $(tc-arch) in - x86|amd64) filter-flags '-mcpu=*';; - *-macos) - # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25127 - [[ ${GCC_BRANCH_VER} == 4.0 || ${GCC_BRANCH_VER} == 4.1 ]] && \ - filter-flags '-mcpu=*' '-march=*' '-mtune=*' - ;; - esac - ;; - esac - - # Compile problems with these (bug #6641 among others)... - #filter-flags "-fno-exceptions -fomit-frame-pointer -fforce-addr" - - # CFLAGS logic (verified with 3.4.3): - # CFLAGS: - # This conflicts when creating a crosscompiler, so set to a sane - # default in this case: - # used in ./configure and elsewhere for the native compiler - # used by gcc when creating libiberty.a - # used by xgcc when creating libstdc++ (and probably others)! - # this behavior should be removed... - # - # CXXFLAGS: - # used by xgcc when creating libstdc++ - # - # STAGE1_CFLAGS (not used in creating a crosscompile gcc): - # used by ${CHOST}-gcc for building stage1 compiler - # - # BOOT_CFLAGS (not used in creating a crosscompile gcc): - # used by xgcc for building stage2/3 compiler - - if is_crosscompile ; then - # Set this to something sane for both native and target - CFLAGS="-O2 -pipe" - - local VAR="CFLAGS_"${CTARGET//-/_} - CXXFLAGS=${!VAR} - fi - - export GCJFLAGS=${GCJFLAGS:-${CFLAGS}} -} - -gcc_src_compile() { - gcc_do_filter_flags - einfo "CFLAGS=\"${CFLAGS}\"" - einfo "CXXFLAGS=\"${CXXFLAGS}\"" - - # For hardened gcc 4 for build the hardened specs file to use when building gcc - setup_minispecs_gcc_build_specs - - # Build in a separate build tree - mkdir -p "${WORKDIR}"/build - pushd "${WORKDIR}"/build > /dev/null - - # Install our pre generated manpages if we do not have perl ... - [[ ! -x /usr/bin/perl ]] && [[ -n ${MAN_VER} ]] && \ - unpack gcc-${MAN_VER}-manpages.tar.bz2 - - einfo "Configuring ${PN} ..." - gcc_do_configure - - touch "${S}"/gcc/c-gperf.h - - # Do not make manpages if we do not have perl ... - [[ ! -x /usr/bin/perl ]] \ - && find "${WORKDIR}"/build -name '*.[17]' | xargs touch - - einfo "Compiling ${PN} ..." - gcc_do_make ${GCC_MAKE_TARGET} - - # Do not create multiple specs files for PIE+SSP if boundschecking is in - # USE, as we disable PIE+SSP when it is. - # minispecs and espf will not need to split out specs. - if [[ ${ETYPE} == "gcc-compiler" ]] && want_split_specs && ! want_minispecs && ! want_espf ; then - split_out_specs_files || die "failed to split out specs" - fi - - popd > /dev/null -} - -gcc_src_test() { - cd "${WORKDIR}"/build - emake -j1 -k check || ewarn "check failed and that sucks :(" -} - -gcc-library_src_install() { - # Do the 'make install' from the build directory - cd "${WORKDIR}"/build - S=${WORKDIR}/build \ - emake -j1 \ - DESTDIR="${D}" \ - prefix=${PREFIX} \ - bindir=${BINPATH} \ - includedir=${LIBPATH}/include \ - datadir=${DATAPATH} \ - mandir=${DATAPATH}/man \ - infodir=${DATAPATH}/info \ - LIBPATH="${LIBPATH}" \ - ${GCC_INSTALL_TARGET} || die - - if [[ ${GCC_LIB_COMPAT_ONLY} == "true" ]] ; then - rm -rf "${D}"${INCLUDEPATH} - rm -rf "${D}"${DATAPATH} - pushd "${D}"${LIBPATH}/ - rm *.a *.la *.so - popd - fi - - if [[ -n ${GCC_LIB_USE_SUBDIR} ]] ; then - mkdir -p "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/ - mv "${D}"${LIBPATH}/* "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/ - mv "${WORKDIR}"/${GCC_LIB_USE_SUBDIR}/ "${D}"${LIBPATH} - - dodir /etc/env.d - echo "LDPATH=\"${LIBPATH}/${GCC_LIB_USE_SUBDIR}/\"" >> "${D}"/etc/env.d/99${PN} - fi - - if [[ ${GCC_VAR_TYPE} == "non-versioned" ]] ; then - # if we're not using versioned directories, we need to use versioned - # filenames. - add_version_to_shared - fi -} - -gcc-compiler_src_install() { - local x= - - cd "${WORKDIR}"/build - # Do allow symlinks in private gcc include dir as this can break the build - find gcc/include*/ -type l -print0 | xargs rm -f - # Remove generated headers, as they can cause things to break - # (ncurses, openssl, etc). - for x in $(find gcc/include*/ -name '*.h') ; do - grep -q 'It has been auto-edited by fixincludes from' "${x}" \ - && rm -f "${x}" - done - # Do the 'make install' from the build directory - S=${WORKDIR}/build \ - emake -j1 DESTDIR="${D}" install || die - # Punt some tools which are really only useful while building gcc - find "${D}" -name install-tools -prune -type d -exec rm -rf "{}" \; - # This one comes with binutils - find "${D}" -name libiberty.a -exec rm -f "{}" \; - - # Move the libraries to the proper location - gcc_movelibs - - # Basic sanity check - if ! is_crosscompile ; then - local EXEEXT - eval $(grep ^EXEEXT= "${WORKDIR}"/build/gcc/config.log) - [[ -r ${D}${BINPATH}/gcc${EXEEXT} ]] || die "gcc not found in ${D}" - fi - - dodir /etc/env.d/gcc - create_gcc_env_entry - - if want_split_specs ; then - if use hardened ; then - create_gcc_env_entry vanilla - fi - ! use hardened && hardened_gcc_works && create_gcc_env_entry hardened - if hardened_gcc_works || hardened_gcc_works pie ; then - create_gcc_env_entry hardenednossp - fi - if hardened_gcc_works || hardened_gcc_works ssp ; then - create_gcc_env_entry hardenednopie - fi - create_gcc_env_entry hardenednopiessp - - insinto ${LIBPATH} - doins "${WORKDIR}"/build/*.specs || die "failed to install specs" - fi - # Setup the gcc_env_entry for hardened gcc 4 with minispecs or espf - if want_minispecs ; then - if hardened_gcc_works pie ; then - create_gcc_env_entry hardenednopie - fi - create_gcc_env_entry vanilla - fi - - if want_espf ; then - create_gcc_env_entry hardenednopie - create_gcc_env_entry hardenednossp - create_gcc_env_entry vanilla - fi - - # Make sure we dont have stuff lying around that - # can nuke multiple versions of gcc - - gcc_slot_java - - # Move <cxxabi.h> to compiler-specific directories - [[ -f ${D}${STDCXX_INCDIR}/cxxabi.h ]] && \ - mv -f "${D}"${STDCXX_INCDIR}/cxxabi.h "${D}"${LIBPATH}/include/ - - # These should be symlinks - dodir /usr/bin - cd "${D}"${BINPATH} - for x in cpp gcc g++ c++ g77 gcj gcjh gfortran ; do - # For some reason, g77 gets made instead of ${CTARGET}-g77... - # this should take care of that - [[ -f ${x} ]] && mv ${x} ${CTARGET}-${x} - - if [[ -f ${CTARGET}-${x} ]] && ! is_crosscompile ; then - ln -sf ${CTARGET}-${x} ${x} - - # Create version-ed symlinks - dosym ${BINPATH}/${CTARGET}-${x} \ - /usr/bin/${CTARGET}-${x}-${GCC_CONFIG_VER} - dosym ${BINPATH}/${CTARGET}-${x} \ - /usr/bin/${x}-${GCC_CONFIG_VER} - fi - - if [[ -f ${CTARGET}-${x}-${GCC_CONFIG_VER} ]] ; then - rm -f ${CTARGET}-${x}-${GCC_CONFIG_VER} - ln -sf ${CTARGET}-${x} ${CTARGET}-${x}-${GCC_CONFIG_VER} - fi - done - - # I do not know if this will break gcj stuff, so I'll only do it for - # objc for now; basically "ffi.h" is the correct file to include, - # but it gets installed in .../GCCVER/include and yet it does - # "#include <ffitarget.h>" which (correctly, as it's an "extra" file) - # is installed in .../GCCVER/include/libffi; the following fixes - # ffi.'s include of ffitarget.h - Armando Di Cianno <fafhrd@gentoo.org> - if [[ -d ${D}${LIBPATH}/include/libffi ]] ; then - mv -i "${D}"${LIBPATH}/include/libffi/* "${D}"${LIBPATH}/include || die - rm -r "${D}"${LIBPATH}/include/libffi || die - fi - - # Now do the fun stripping stuff - env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${BINPATH}" - env RESTRICT="" CHOST=${CTARGET} prepstrip "${D}${LIBPATH}" - # gcc used to install helper binaries in lib/ but then moved to libexec/ - [[ -d ${D}${PREFIX}/libexec/gcc ]] && \ - env RESTRICT="" CHOST=${CHOST} prepstrip "${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}" - - cd "${S}" - if is_crosscompile; then - rm -rf "${D}"/usr/share/{man,info} - rm -rf "${D}"${DATAPATH}/{man,info} - else - local cxx_mandir=${WORKDIR}/build/${CTARGET}/libstdc++-v3/docs/doxygen/man - if [[ -d ${cxx_mandir} ]] ; then - # clean bogus manpages #113902 - find "${cxx_mandir}" -name '*_build_*' -exec rm {} \; - cp -r "${cxx_mandir}"/man? "${D}/${DATAPATH}"/man/ - fi - has noinfo ${FEATURES} \ - && rm -r "${D}/${DATAPATH}"/info \ - || prepinfo "${DATAPATH}" - has noman ${FEATURES} \ - && rm -r "${D}/${DATAPATH}"/man \ - || prepman "${DATAPATH}" - fi - # prune empty dirs left behind - for x in 1 2 3 4 ; do - find "${D}" -type d -exec rmdir "{}" \; >& /dev/null - done - - # install testsuite results - if use test; then - docinto testsuite - find "${WORKDIR}"/build -type f -name "*.sum" -print0 | xargs -0 dodoc - find "${WORKDIR}"/build -type f -path "*/testsuite/*.log" -print0 \ - | xargs -0 dodoc - fi - - # Rather install the script, else portage with changing $FILESDIR - # between binary and source package borks things .... - if ! is_crosscompile ; then - insinto "${DATAPATH}" - if tc_version_is_at_least 4.0 ; then - newins "${GCC_FILESDIR}"/awk/fixlafiles.awk-no_gcc_la fixlafiles.awk || die - find "${D}/${LIBPATH}" -name libstdc++.la -type f -exec rm "{}" \; - else - doins "${GCC_FILESDIR}"/awk/fixlafiles.awk || die - fi - exeinto "${DATAPATH}" - doexe "${GCC_FILESDIR}"/fix_libtool_files.sh || die - doexe "${GCC_FILESDIR}"/c{89,99} || die - fi - - # use gid of 0 because some stupid ports don't have - # the group 'root' set to gid 0 - chown -R root:0 "${D}"${LIBPATH} - - # Create config files for eselect-compiler - create_eselect_conf - - # Copy the needed minispec for hardened gcc 4 - copy_minispecs_gcc_specs -} - -gcc_slot_java() { - local x - - # Move Java headers to compiler-specific dir - for x in "${D}"${PREFIX}/include/gc*.h "${D}"${PREFIX}/include/j*.h ; do - [[ -f ${x} ]] && mv -f "${x}" "${D}"${LIBPATH}/include/ - done - for x in gcj gnu java javax org ; do - if [[ -d ${D}${PREFIX}/include/${x} ]] ; then - dodir /${LIBPATH}/include/${x} - mv -f "${D}"${PREFIX}/include/${x}/* "${D}"${LIBPATH}/include/${x}/ - rm -rf "${D}"${PREFIX}/include/${x} - fi - done - - if [[ -d ${D}${PREFIX}/lib/security ]] || [[ -d ${D}${PREFIX}/$(get_libdir)/security ]] ; then - dodir /${LIBPATH}/security - mv -f "${D}"${PREFIX}/lib*/security/* "${D}"${LIBPATH}/security - rm -rf "${D}"${PREFIX}/lib*/security - fi - - # Move libgcj.spec to compiler-specific directories - [[ -f ${D}${PREFIX}/lib/libgcj.spec ]] && \ - mv -f "${D}"${PREFIX}/lib/libgcj.spec "${D}"${LIBPATH}/libgcj.spec - - # SLOT up libgcj.pc (and let gcc-config worry about links) - local libgcj=$(find "${D}"${PREFIX}/lib/pkgconfig/ -name 'libgcj*.pc') - if [[ -n ${libgcj} ]] ; then - sed -i "/^libdir=/s:=.*:=${LIBPATH}:" "${libgcj}" - mv "${libgcj}" "${D}"/usr/lib/pkgconfig/libgcj-${GCC_PV}.pc || die - fi - - # Rename jar because it could clash with Kaffe's jar if this gcc is - # primary compiler (aka don't have the -<version> extension) - cd "${D}"${BINPATH} - [[ -f jar ]] && mv -f jar gcj-jar -} - -# Move around the libs to the right location. For some reason, -# when installing gcc, it dumps internal libraries into /usr/lib -# instead of the private gcc lib path -gcc_movelibs() { - # older versions of gcc did not support --print-multi-os-directory - tc_version_is_at_least 3.0 || return 0 - - local multiarg removedirs="" - for multiarg in $($(XGCC) -print-multi-lib) ; do - multiarg=${multiarg#*;} - multiarg=${multiarg//@/ -} - - local OS_MULTIDIR=$($(XGCC) ${multiarg} --print-multi-os-directory) - local MULTIDIR=$($(XGCC) ${multiarg} --print-multi-directory) - local TODIR=${D}${LIBPATH}/${MULTIDIR} - local FROMDIR= - - [[ -d ${TODIR} ]] || mkdir -p ${TODIR} - - for FROMDIR in \ - ${LIBPATH}/${OS_MULTIDIR} \ - ${LIBPATH}/../${MULTIDIR} \ - ${PREFIX}/lib/${OS_MULTIDIR} \ - ${PREFIX}/${CTARGET}/lib/${OS_MULTIDIR} \ - ${PREFIX}/lib/${MULTIDIR} - do - removedirs="${removedirs} ${FROMDIR}" - FROMDIR=${D}${FROMDIR} - if [[ ${FROMDIR} != "${TODIR}" && -d ${FROMDIR} ]] ; then - local files=$(find "${FROMDIR}" -maxdepth 1 ! -type d 2>/dev/null) - if [[ -n ${files} ]] ; then - mv ${files} "${TODIR}" - fi - fi - done - fix_libtool_libdir_paths "${LIBPATH}/${MULTIDIR}" - done - - # We remove directories separately to avoid this case: - # mv SRC/lib/../lib/*.o DEST - # rmdir SRC/lib/../lib/ - # mv SRC/lib/../lib32/*.o DEST # Bork - for FROMDIR in ${removedirs} ; do - rmdir "${D}"${FROMDIR} >& /dev/null - done - find "${D}" -type d | xargs rmdir >& /dev/null -} - -#----<< src_* >>---- - -#---->> unorganized crap in need of refactoring follows - -# gcc_quick_unpack will unpack the gcc tarball and patches in a way that is -# consistant with the behavior of get_gcc_src_uri. The only patch it applies -# itself is the branch update if present. -# -# Travis Tilley <lv@gentoo.org> (03 Sep 2004) -# -gcc_quick_unpack() { - pushd "${WORKDIR}" > /dev/null - export PATCH_GCC_VER=${PATCH_GCC_VER:-${GCC_RELEASE_VER}} - export UCLIBC_GCC_VER=${UCLIBC_GCC_VER:-${PATCH_GCC_VER}} - export PIE_GCC_VER=${PIE_GCC_VER:-${GCC_RELEASE_VER}} - export PP_GCC_VER=${PP_GCC_VER:-${GCC_RELEASE_VER}} - export HTB_GCC_VER=${HTB_GCC_VER:-${GCC_RELEASE_VER}} - export SPECS_GCC_VER=${SPECS_GCC_VER:-${GCC_RELEASE_VER}} - - if [[ -n ${GCC_A_FAKEIT} ]] ; then - unpack ${GCC_A_FAKEIT} - elif [[ -n ${PRERELEASE} ]] ; then - unpack gcc-${PRERELEASE}.tar.bz2 - elif [[ -n ${SNAPSHOT} ]] ; then - unpack gcc-${SNAPSHOT}.tar.bz2 - else - unpack gcc-${GCC_RELEASE_VER}.tar.bz2 - # We want branch updates to be against a release tarball - if [[ -n ${BRANCH_UPDATE} ]] ; then - pushd "${S}" > /dev/null - epatch "${DISTDIR}"/gcc-${GCC_RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 - popd > /dev/null - fi - fi - - if [[ -n ${D_VER} ]] && use d ; then - pushd "${S}"/gcc > /dev/null - unpack gdc-${D_VER}-src.tar.bz2 - cd .. - ebegin "Adding support for the D language" - ./gcc/d/setup-gcc.sh >& "${T}"/dgcc.log - if ! eend $? ; then - eerror "The D gcc package failed to apply" - eerror "Please include this log file when posting a bug report:" - eerror " ${T}/dgcc.log" - die "failed to include the D language" - fi - popd > /dev/null - fi - - [[ -n ${PATCH_VER} ]] && \ - unpack gcc-${PATCH_GCC_VER}-patches-${PATCH_VER}.tar.bz2 - - [[ -n ${UCLIBC_VER} ]] && \ - unpack gcc-${UCLIBC_GCC_VER}-uclibc-patches-${UCLIBC_VER}.tar.bz2 - - if want_ssp ; then - if [[ -n ${PP_FVER} ]] ; then - # The gcc 3.4 propolice versions are meant to be unpacked to ${S} - pushd "${S}" > /dev/null - unpack protector-${PP_FVER}.tar.gz - popd > /dev/null - else - unpack gcc-${PP_GCC_VER}-ssp-${PP_VER}.tar.bz2 - fi - fi - - if want_pie ; then - if [[ -n ${PIE_CORE} ]] ; then - unpack ${PIE_CORE} - else - unpack gcc-${PIE_GCC_VER}-piepatches-v${PIE_VER}.tar.bz2 - fi - fi - - if [[ -n ${ESPF_VER} ]] ; then - unpack gcc-${GCC_RELEASE_VER}-espf-${ESPF_VER}.tar.bz2 - fi - - [[ -n ${SPECS_VER} ]] && \ - unpack gcc-${SPECS_GCC_VER}-specs-${SPECS_VER}.tar.bz2 - - want_boundschecking && \ - unpack "bounds-checking-gcc-${HTB_GCC_VER}-${HTB_VER}.patch.bz2" - - popd > /dev/null -} - -# Exclude any unwanted patches, as specified by the following variables: -# -# GENTOO_PATCH_EXCLUDE -# List of filenames, relative to ${WORKDIR}/patch/ -# -# PIEPATCH_EXCLUDE -# List of filenames, relative to ${WORKDIR}/piepatch/ -# -# Travis Tilley <lv@gentoo.org> (03 Sep 2004) -# -exclude_gcc_patches() { - local i - for i in ${GENTOO_PATCH_EXCLUDE} ; do - if [[ -f ${WORKDIR}/patch/${i} ]] ; then - einfo "Excluding patch ${i}" - rm -f "${WORKDIR}"/patch/${i} || die "failed to delete ${i}" - fi - done - for i in ${PIEPATCH_EXCLUDE} ; do - if [[ -f ${WORKDIR}/piepatch/${i} ]] ; then - einfo "Excluding piepatch ${i}" - rm -f "${WORKDIR}"/piepatch/${i} || die "failed to delete ${i}" - fi - done -} - -# Try to apply some stub patches so that gcc won't error out when -# passed parameters like -fstack-protector but no ssp is found -do_gcc_stub() { - local v stub_patch="" - for v in ${GCC_RELEASE_VER} ${GCC_BRANCH_VER} ; do - stub_patch=${GCC_FILESDIR}/stubs/gcc-${v}-$1-stub.patch - if [[ -e ${stub_patch} ]] && ! use vanilla ; then - EPATCH_SINGLE_MSG="Applying stub patch for $1 ..." \ - epatch "${stub_patch}" - return 0 - fi - done -} - -do_gcc_HTB_patches() { - if ! want_boundschecking || \ - (want_ssp && [[ ${HTB_EXCLUSIVE} == "true" ]]) - then - do_gcc_stub htb - return 0 - fi - - # modify the bounds checking patch with a regression patch - epatch "${WORKDIR}/bounds-checking-gcc-${HTB_GCC_VER}-${HTB_VER}.patch" - BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, HTB-${HTB_GCC_VER}-${HTB_VER}" -} - -# patch in ProPolice Stack Smashing protection -do_gcc_SSP_patches() { - # PARISC has no love ... it's our stack :( - if [[ $(tc-arch) == "hppa" ]] || \ - ! want_ssp || \ - (want_boundschecking && [[ ${HTB_EXCLUSIVE} == "true" ]]) - then - do_gcc_stub ssp - return 0 - fi - - local ssppatch - local sspdocs - - if [[ -n ${PP_FVER} ]] ; then - # Etoh keeps changing where files are and what the patch is named - if tc_version_is_at_least 3.4.1 ; then - # >3.4.1 uses version in patch name, and also includes docs - ssppatch="${S}/gcc_${PP_VER}.dif" - sspdocs="yes" - elif tc_version_is_at_least 3.4.0 ; then - # >3.4 put files where they belong and 3_4 uses old patch name - ssppatch="${S}/protector.dif" - sspdocs="no" - elif tc_version_is_at_least 3.2.3 ; then - # earlier versions have no directory structure or docs - mv "${S}"/protector.{c,h} "${S}"/gcc - ssppatch="${S}/protector.dif" - sspdocs="no" - fi - else - # Just start packaging the damn thing ourselves - mv "${WORKDIR}"/ssp/protector.{c,h} "${S}"/gcc/ - ssppatch=${WORKDIR}/ssp/gcc-${PP_GCC_VER}-ssp.patch - # allow boundschecking and ssp to get along - (want_boundschecking && [[ -e ${WORKDIR}/ssp/htb-ssp.patch ]]) \ - && patch -s "${ssppatch}" "${WORKDIR}"/ssp/htb-ssp.patch - fi - - [[ -z ${ssppatch} ]] && die "Sorry, SSP is not supported in this version" - epatch ${ssppatch} - - if [[ ${PN} == "gcc" && ${sspdocs} == "no" ]] ; then - epatch "${GCC_FILESDIR}"/pro-police-docs.patch - fi - - # Don't build crtbegin/end with ssp - sed -e 's|^CRTSTUFF_CFLAGS = |CRTSTUFF_CFLAGS = -fno-stack-protector |'\ - -i gcc/Makefile.in || die "Failed to update crtstuff!" - - # if gcc in a stage3 defaults to ssp, is version 3.4.0 and a stage1 is built - # the build fails building timevar.o w/: - # cc1: stack smashing attack in function ix86_split_to_parts() - if use build && tc_version_is_at_least 3.4.0 ; then - if gcc -dumpspecs | grep -q "fno-stack-protector:" ; then - epatch "${GCC_FILESDIR}"/3.4.0/gcc-3.4.0-cc1-no-stack-protector.patch - fi - fi - - BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, ssp-${PP_FVER:-${PP_GCC_VER}-${PP_VER}}" - if want_libssp ; then - update_gcc_for_libssp - else - update_gcc_for_libc_ssp - fi - - # Don't build libgcc with ssp - sed -e 's|^\(LIBGCC2_CFLAGS.*\)$|\1 -fno-stack-protector|' \ - -i gcc/Makefile.in || die "Failed to update gcc!" -} - -# If glibc or uclibc has been patched to provide the necessary symbols itself, -# then lets use those for SSP instead of libgcc. -update_gcc_for_libc_ssp() { - if libc_has_ssp ; then - einfo "Updating gcc to use SSP from libc ..." - sed -e 's|^\(LIBGCC2_CFLAGS.*\)$|\1 -D_LIBC_PROVIDES_SSP_|' \ - -i "${S}"/gcc/Makefile.in || die "Failed to update gcc!" - fi -} - -# a split out non-libc non-libgcc ssp requires additional spec logic changes -update_gcc_for_libssp() { - einfo "Updating gcc to use SSP from libssp..." - sed -e 's|^\(INTERNAL_CFLAGS.*\)$|\1 -D_LIBSSP_PROVIDES_SSP_|' \ - -i "${S}"/gcc/Makefile.in || die "Failed to update gcc!" -} - -# do various updates to PIE logic -do_gcc_PIE_patches() { - if ! want_pie || \ - (want_boundschecking && [[ ${HTB_EXCLUSIVE} == "true" ]]) - then - return 0 - fi - - want_boundschecking \ - && rm -f "${WORKDIR}"/piepatch/*/*-boundschecking-no.patch* \ - || rm -f "${WORKDIR}"/piepatch/*/*-boundschecking-yes.patch* - - use vanilla && return 0 - - if tc_version_is_at_least 4.3.2; then - guess_patch_type_in_dir "${WORKDIR}"/piepatch/ - EPATCH_MULTI_MSG="Applying pie patches ..." \ - epatch "${WORKDIR}"/piepatch/ - else - guess_patch_type_in_dir "${WORKDIR}"/piepatch/upstream - - # corrects startfile/endfile selection and shared/static/pie flag usage - EPATCH_MULTI_MSG="Applying upstream pie patches ..." \ - epatch "${WORKDIR}"/piepatch/upstream - # adds non-default pie support (rs6000) - EPATCH_MULTI_MSG="Applying non-default pie patches ..." \ - epatch "${WORKDIR}"/piepatch/nondef - # adds default pie support (rs6000 too) if DEFAULT_PIE[_SSP] is defined - EPATCH_MULTI_MSG="Applying default pie patches ..." \ - epatch "${WORKDIR}"/piepatch/def - - # we want to be able to control the pie patch logic via something other - # than ALL_CFLAGS... - sed -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \ - -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \ - -i "${S}"/gcc/Makefile.in - fi - - BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, pie-${PIE_VER}" -} - -# do various updates to ESPF -do_gcc_ESPF_patches() { - if [[ -n ${ESPF_VER} ]] || ! use vanilla; then - guess_patch_type_in_dir "${WORKDIR}"/espf-gcc-"${GCC_RELEASE_VER}" - EPATCH_MULTI_MSG="Applying espf patches ..." \ - epatch "${WORKDIR}"/espf-gcc-"${GCC_RELEASE_VER}" - BRANDING_GCC_PKGVERSION="${BRANDING_GCC_PKGVERSION}, espf-${ESPF_VER}" - fi -} - -should_we_gcc_config() { - # we always want to run gcc-config if we're bootstrapping, otherwise - # we might get stuck with the c-only stage1 compiler - use bootstrap && return 0 - use build && return 0 - - # if the current config is invalid, we definitely want a new one - # Note: due to bash quirkiness, the following must not be 1 line - local curr_config - curr_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} 2>&1) || return 0 - - # if the previously selected config has the same major.minor (branch) as - # the version we are installing, then it will probably be uninstalled - # for being in the same SLOT, make sure we run gcc-config. - local curr_config_ver=$(env -i ROOT="${ROOT}" gcc-config -S ${curr_config} | awk '{print $2}') - - local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver}) - - # If we're using multislot, just run gcc-config if we're installing - # to the same profile as the current one. - use multislot && return $([[ ${curr_config_ver} == ${GCC_CONFIG_VER} ]]) - - if [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then - return 0 - else - # if we're installing a genuinely different compiler version, - # we should probably tell the user -how- to switch to the new - # gcc version, since we're not going to do it for him/her. - # We don't want to switch from say gcc-3.3 to gcc-3.4 right in - # the middle of an emerge operation (like an 'emerge -e world' - # which could install multiple gcc versions). - einfo "The current gcc config appears valid, so it will not be" - einfo "automatically switched for you. If you would like to" - einfo "switch to the newly installed gcc version, do the" - einfo "following:" - echo - einfo "gcc-config ${CTARGET}-${GCC_CONFIG_VER}" - einfo "source /etc/profile" - echo - ebeep - return 1 - fi -} - -do_gcc_config() { - if ! should_we_gcc_config ; then - env -i ROOT="${ROOT}" gcc-config --use-old --force - return 0 - fi - - local current_gcc_config="" current_specs="" use_specs="" - - # We grep out any possible errors - current_gcc_config=$(env -i ROOT="${ROOT}" gcc-config -c ${CTARGET} | grep -v '^ ') - if [[ -n ${current_gcc_config} ]] ; then - # figure out which specs-specific config is active - current_specs=$(gcc-config -S ${current_gcc_config} | awk '{print $3}') - [[ -n ${current_specs} ]] && use_specs=-${current_specs} - fi - if [[ -n ${use_specs} ]] && \ - [[ ! -e ${ROOT}/etc/env.d/gcc/${CTARGET}-${GCC_CONFIG_VER}${use_specs} ]] - then - ewarn "The currently selected specs-specific gcc config," - ewarn "${current_specs}, doesn't exist anymore. This is usually" - ewarn "due to enabling/disabling hardened or switching to a version" - ewarn "of gcc that doesnt create multiple specs files. The default" - ewarn "config will be used, and the previous preference forgotten." - ebeep - epause - use_specs="" - fi - - gcc-config ${CTARGET}-${GCC_CONFIG_VER}${use_specs} -} - -should_we_eselect_compiler() { - # we always want to run gcc-config if we're bootstrapping, otherwise - # we might get stuck with the c-only stage1 compiler - use bootstrap && return 0 - use build && return 0 - - # if the current config is invalid, we definitely want a new one - # Note: due to bash quirkiness, the following must not be 1 line - local curr_config - curr_config=$(env -i eselect compiler show ${CTARGET} 2>&1) || return 0 - [[ -z ${curr_config} || ${curr_config} == "(none)" ]] && return 0 - - # if the previously selected config has the same major.minor (branch) as - # the version we are installing, then it will probably be uninstalled - # for being in the same SLOT, make sure we run gcc-config. - local curr_config_ver=$(echo ${curr_config} | cut -f1 -d/ | awk -F - '{ print $5 }') - local curr_branch_ver=$(get_version_component_range 1-2 ${curr_config_ver}) - - # If we're using multislot, just run gcc-config if we're installing - # to the same profile as the current one. - use multislot && return $([[ ${curr_config_ver} == ${GCC_CONFIG_VER} ]]) - - if [[ ${curr_branch_ver} == ${GCC_BRANCH_VER} ]] ; then - return 0 - else - # if we're installing a genuinely different compiler version, - # we should probably tell the user -how- to switch to the new - # gcc version, since we're not going to do it for him/her. - # We don't want to switch from say gcc-3.3 to gcc-3.4 right in - # the middle of an emerge operation (like an 'emerge -e world' - # which could install multiple gcc versions). - einfo "The current gcc config appears valid, so it will not be" - einfo "automatically switched for you. If you would like to" - einfo "switch to the newly installed gcc version, do the" - einfo "following:" - echo - einfo "eselect compiler set <profile>" - echo - ebeep - return 1 - fi -} - -do_eselect_compiler() { - if ! should_we_eselect_compiler; then - eselect compiler update - return 0 - fi - - for abi in $(get_all_abis) ; do - local ctarget=$(get_abi_CHOST ${abi}) - local current_specs=$(env -i eselect compiler show ${ctarget} | cut -f2 -d/) - - if [[ -n ${current_specs} && ${current_specs} != "(none)" ]] && eselect compiler set ${CTARGET}-${GCC_CONFIG_VER}/${current_specs} &> /dev/null; then - einfo "The following compiler profile has been activated based on your previous profile:" - einfo "${CTARGET}-${GCC_CONFIG_VER}/${current_specs}" - else - # We couldn't choose based on the old specs, so fall back on vanilla/hardened based on USE - - local spec - if use hardened ; then - spec="hardened" - else - spec="vanilla" - fi - - local profile - local isset=0 - for profile in "${current_specs%-*}-${spec}" "${abi}-${spec}" "${spec}" ; do - if eselect compiler set ${CTARGET}-${GCC_CONFIG_VER}/${profile} &> /dev/null ; then - ewarn "The newly installed version of gcc does not have a profile that matches the name of your" - ewarn "currently selected profile for ${ctarget}, so we have enabled the following instead:" - ewarn "${CTARGET}-${GCC_CONFIG_VER}/${profile}" - ewarn "If this is incorrect, please use 'eselect compiler set' to" - ewarn "select another profile." - - isset=1 - break - fi - done - - if [[ ${isset} == 0 ]] ; then - eerror "We were not able to automatically set the current compiler for ${ctarget}" - eerror "to your newly emerged gcc. Please use 'eselect compiler set'" - eerror "to select your compiler." - fi - fi - done -} - -# This function allows us to gentoo-ize gcc's version number and bugzilla -# URL without needing to use patches. -gcc_version_patch() { - # gcc-4.3+ has configure flags (whoo!) - tc_version_is_at_least 4.3 && return 0 - - local version_string=${GCC_CONFIG_VER} - [[ -n ${BRANCH_UPDATE} ]] && version_string="${version_string} ${BRANCH_UPDATE}" - - einfo "patching gcc version: ${version_string} (${BRANDING_GCC_PKGVERSION})" - - if grep -qs VERSUFFIX "${S}"/gcc/version.c ; then - sed -i -e "s~VERSUFFIX \"\"~VERSUFFIX \" (${BRANDING_GCC_PKGVERSION})\"~" \ - "${S}"/gcc/version.c || die "failed to update VERSUFFIX with Gentoo branding" - else - version_string="${version_string} (${BRANDING_GCC_PKGVERSION})" - sed -i -e "s~\(const char version_string\[\] = \"\).*\(\".*\)~\1$version_string\2~" \ - "${S}"/gcc/version.c || die "failed to update version.c with Gentoo branding." - fi - sed -i -e 's~gcc\.gnu\.org\/bugs\.html~bugs\.gentoo\.org\/~' \ - "${S}"/gcc/version.c || die "Failed to change the bug URL" -} - -# The purpose of this DISGUSTING gcc multilib hack is to allow 64bit libs -# to live in lib instead of lib64 where they belong, with 32bit libraries -# in lib32. This hack has been around since the beginning of the amd64 port, -# and we're only now starting to fix everything that's broken. Eventually -# this should go away. -# -# Travis Tilley <lv@gentoo.org> (03 Sep 2004) -# -disgusting_gcc_multilib_HACK() { - local config - local libdirs - if has_multilib_profile ; then - case $(tc-arch) in - amd64) - config="i386/t-linux64" - libdirs="../$(get_abi_LIBDIR amd64) ../$(get_abi_LIBDIR x86)" \ - ;; - ppc64) - config="rs6000/t-linux64" - libdirs="../$(get_abi_LIBDIR ppc64) ../$(get_abi_LIBDIR ppc)" \ - ;; - esac - else - die "Your profile is no longer supported by portage." - fi - - einfo "updating multilib directories to be: ${libdirs}" - sed -i -e "s:^MULTILIB_OSDIRNAMES.*:MULTILIB_OSDIRNAMES = ${libdirs}:" "${S}"/gcc/config/${config} -} - -disable_multilib_libjava() { - if is_gcj ; then - # We dont want a multilib libjava, so lets use this hack taken from fedora - pushd "${S}" > /dev/null - sed -i -e 's/^all: all-redirect/ifeq (\$(MULTISUBDIR),)\nall: all-redirect\nelse\nall:\n\techo Multilib libjava build disabled\nendif/' libjava/Makefile.in - sed -i -e 's/^install: install-redirect/ifeq (\$(MULTISUBDIR),)\ninstall: install-redirect\nelse\ninstall:\n\techo Multilib libjava install disabled\nendif/' libjava/Makefile.in - sed -i -e 's/^check: check-redirect/ifeq (\$(MULTISUBDIR),)\ncheck: check-redirect\nelse\ncheck:\n\techo Multilib libjava check disabled\nendif/' libjava/Makefile.in - sed -i -e 's/^all: all-recursive/ifeq (\$(MULTISUBDIR),)\nall: all-recursive\nelse\nall:\n\techo Multilib libjava build disabled\nendif/' libjava/Makefile.in - sed -i -e 's/^install: install-recursive/ifeq (\$(MULTISUBDIR),)\ninstall: install-recursive\nelse\ninstall:\n\techo Multilib libjava install disabled\nendif/' libjava/Makefile.in - sed -i -e 's/^check: check-recursive/ifeq (\$(MULTISUBDIR),)\ncheck: check-recursive\nelse\ncheck:\n\techo Multilib libjava check disabled\nendif/' libjava/Makefile.in - popd > /dev/null - fi -} - -# make sure the libtool archives have libdir set to where they actually -# -are-, and not where they -used- to be. also, any dependencies we have -# on our own .la files need to be updated. -fix_libtool_libdir_paths() { - pushd "${D}" >/dev/null - - pushd "${1}" >/dev/null - local dir="${PWD#${D}}" - local allarchives=$(echo *.la) - allarchives="\(${allarchives// /\\|}\)" - popd >/dev/null - - sed -i \ - -e "/^libdir=/s:=.*:='${dir}':" \ - ./${dir}/*.la - sed -i \ - -e "/^dependency_libs=/s:/[^ ]*/${allarchives}:${LIBPATH}/\1:g" \ - $(find ./${PREFIX}/lib* -maxdepth 3 -name '*.la') \ - ./${dir}/*.la - - popd >/dev/null -} - -is_multilib() { - [[ ${GCCMAJOR} < 3 ]] && return 1 - case ${CTARGET} in - mips64*|powerpc64*|s390x*|sparc*|x86_64*) - has_multilib_profile || use multilib ;; - *-*-solaris*) use multilib ;; - *-apple-darwin*) use multilib ;; - *) false ;; - esac -} - -is_cxx() { - gcc-lang-supported 'c++' || return 1 - ! use nocxx -} - -is_d() { - gcc-lang-supported d || return 1 - use d -} - -is_f77() { - gcc-lang-supported f77 || return 1 - use fortran -} - -is_f95() { - gcc-lang-supported f95 || return 1 - use fortran -} - -is_fortran() { - gcc-lang-supported fortran || return 1 - use fortran -} - -is_gcj() { - gcc-lang-supported java || return 1 - use gcj -} - -is_libffi() { - has libffi ${IUSE} || return 1 - use libffi -} - -is_objc() { - gcc-lang-supported objc || return 1 - use objc -} - -is_objcxx() { - gcc-lang-supported 'obj-c++' || return 1 - use objc++ -} - -is_ada() { - gcc-lang-supported ada || return 1 - use ada -} - -is_treelang() { - has boundschecking ${IUSE} && use boundschecking && return 1 #260532 - is_crosscompile && return 1 #199924 - gcc-lang-supported treelang || return 1 - #use treelang - return 0 -} diff --git a/hardened/amd64/deprecated b/hardened/amd64/deprecated new file mode 100644 index 00000000..2ec537be --- /dev/null +++ b/hardened/amd64/deprecated @@ -0,0 +1,7 @@ +hardened/linux/amd64/10.0/no-multilib +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/amd64/10.0/no-multilib profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/amd64/make.defaults b/hardened/amd64/make.defaults new file mode 100644 index 00000000..1e6c0515 --- /dev/null +++ b/hardened/amd64/make.defaults @@ -0,0 +1,35 @@ +# Copyright 1999-2004 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/amd64/make.defaults,v 1.19 2009/08/16 22:09:13 remi Exp $ + +ARCH="amd64" +ACCEPT_KEYWORDS="${ARCH}" +USE="${ARCH} berkdb crypt hardened justify nls nptl nptlonly pam pic readline ssl tcpd zlib" +MULTILIB_ABIS="amd64" +DEFAULT_ABI="amd64" +ABI="amd64" + +# amd64 +CHOST="x86_64-pc-linux-gnu" +CFLAGS="-O2 -pipe" +CXXFLAGS="${CFLAGS}" + +CFLAGS_amd64="" +LDFLAGS_amd64="-m elf_x86_64" +CHOST_amd64="x86_64-pc-linux-gnu" +CDEFINE_amd64="__x86_64__" +LIBDIR_amd64="lib64" + +SYMLINK_LIB="yes" + +# 2006/08/18 - Donnie Berkholz <dberkholz@gentoo.org> +# Defaults for video drivers +VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 intel mach64 \ + mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis \ + sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo" + +# 2006/12/22 - Danny van Dyk <kugelfang@gentoo.org> +# Default for ALSA_CARDS USE_EXPAND variable. +ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x \ + ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 \ + trident usb-audio via82xx via82xx-modem ymfpci" diff --git a/hardened/amd64/multilib/deprecated b/hardened/amd64/multilib/deprecated new file mode 100644 index 00000000..a4054a37 --- /dev/null +++ b/hardened/amd64/multilib/deprecated @@ -0,0 +1,7 @@ +hardened/linux/amd64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/amd64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/amd64/multilib/make.defaults b/hardened/amd64/multilib/make.defaults new file mode 100644 index 00000000..30d0af0b --- /dev/null +++ b/hardened/amd64/multilib/make.defaults @@ -0,0 +1,32 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/amd64/multilib/make.defaults,v 1.5 2009/06/08 18:37:16 solar Exp $ + +FEATURES="sandbox autoconfig" +USE="${USE} multilib" +MULTILIB_ABIS="x86 amd64" +DEFAULT_ABI="amd64" +ABI=${DEFAULT_ABI} + +#CFLAGS_amd64="-m64" +#LDFLAGS_amd64="-m elf_x86_64" +CHOST_amd64="x86_64-pc-linux-gnu" +CDEFINE_amd64="__x86_64__" +LIBDIR_amd64="lib64" + +# Added -L/emul* workaround to aid compilation of 32bit packages +# See bug #88725 for more info - Herbie Hopkins <herbs@gentoo.org> 2005/04/19 +CFLAGS_x86="-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" +LDFLAGS_x86="-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib" +CHOST_x86="i686-pc-linux-gnu" +CDEFINE_x86="__i386__" +LIBDIR_x86="lib32" + +# In case someone wants to help out by setting FEATURES="multilib-strict" +MULTILIB_STRICT_DIRS="/lib /usr/lib /usr/kde/*/lib /usr/qt/*/lib /usr/X11R6/lib" +MULTILIB_STRICT_DENY="64-bit.*shared object" +MULTILIB_STRICT_EXEMPT="(perl5|gcc|gcc-lib|eclipse-3|debug|portage)" + +# Hack to tell baselayout to use symlinks for /lib, /usr/lib, and /usr/local/lib +SYMLINK_LIB="yes" +PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/hardened/amd64/multilib/" diff --git a/hardened/amd64/multilib/package.mask b/hardened/amd64/multilib/package.mask new file mode 100644 index 00000000..52ace221 --- /dev/null +++ b/hardened/amd64/multilib/package.mask @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/amd64/multilib/package.mask,v 1.3 2009/07/31 11:11:54 ssuominen Exp $ + +# Andrew Ross <aross@gentoo.org> +# grub needs a multilib profile to compile on amd64 - use sys-boot/grub-static +-sys-boot/grub diff --git a/hardened/amd64/multilib/parent b/hardened/amd64/multilib/parent new file mode 100644 index 00000000..f3229c5b --- /dev/null +++ b/hardened/amd64/multilib/parent @@ -0,0 +1 @@ +.. diff --git a/hardened/amd64/multilib/use.mask b/hardened/amd64/multilib/use.mask new file mode 100644 index 00000000..ce8149f9 --- /dev/null +++ b/hardened/amd64/multilib/use.mask @@ -0,0 +1,9 @@ +# Copyright 2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/amd64/multilib/use.mask,v 1.2 2007/08/24 23:18:52 marineam Exp $ + +-multilib + +# 2007/08/24 Michael Marineau <marineam@gentoo.org> +# Xen HVM support, masked on no-multilib but ok here +-hvm diff --git a/hardened/amd64/package.mask b/hardened/amd64/package.mask new file mode 100644 index 00000000..bcff19b5 --- /dev/null +++ b/hardened/amd64/package.mask @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/amd64/package.mask,v 1.5 2009/07/31 11:00:12 ssuominen Exp $ + +# Andrew Ross <aross@gentoo.org> +# grub needs a multilib profile to compile on amd64 - use sys-boot/grub-static +sys-boot/grub diff --git a/hardened/amd64/package.use.mask b/hardened/amd64/package.use.mask new file mode 100644 index 00000000..1c0b350a --- /dev/null +++ b/hardened/amd64/package.use.mask @@ -0,0 +1,92 @@ +# Bernard Cafarelli <voyageur@gentoo.org> (20 Mar 2009) +# Depends on packages not yet keyworded for amd64, cf bug #22042 +app-backup/backup-manager s3 + +# Thomas Sachau <tommy@gentoo.org> (09 Mar 2009) +# copy mask from arch/amd64 +# Mask dbus, hal, nas and scanner USE flags; +# Bug 203680 +# Mask GnuTLS (not available as 32-bit library) +app-emulation/wine dbus hal ldap nas scanner gnutls gphoto2 + +# 2008/08/01 Jean-Noël Rivasseau <elvanor@gentoo.org> +# Disabling gcj flag, no gcc-4.3.1 yet +dev-java/eclipse-ecj gcj + +# missing the necessary linux-headers dep +>=net-fs/netatalk-2.0.3-r3 xfs + +# 20 Mar 2008: Petteri Räty <betelgeuse@gentoo.org> +# jamvm needs ffi on amd64 +# https://bugs.gentoo.org/show_bug.cgi?id=213882 +dev-java/jamvm libffi + +# Dawid Węgliński <cla@gentoo.org> +# Mask amarok2 useflag for net-im/kadu +# See bug #238487 for references +net-im/kadu amarok2 + +# Following is taken from arch/amd64/package.use.mask + +# Vlastimil Babka <caster@gentoo.org> (12 Dec 2008) +# finally a 64bit java plugin +>=dev-java/sun-jdk-1.6.0.12_beta2 -nsplugin + +# Serkan Kaba <serkan@gentoo.org> (5 Feb 2009) +# finally a 64bit java plugin +>=dev-java/sun-jre-bin-1.6.0.12 -nsplugin + + +# Following is x86-32-only SIMD, etc. (some taken from arch/amd64/package.use.mask) + +# Oct 23th 2006; blubb@gentoo.org +# upstream forces sse2 for amd64; mmx flag does nothing +app-crypt/johntheripper mmx + +# Oct 23th 2006; blubb@gentoo.org +# the asm is 64bit save, but it doesn't compile anyway +games-emulation/visualboyadvance mmx + +# Jeremy Olexa <darkside@gentoo.org> (07 Feb 2009) +# USE=mmx on imlib2 causes issues with other apps. See bug 218382 (comments 11-12) +media-libs/imlib2 mmx + +# Apr 25th 2007: Alexis Ballier <aballier@gentoo.org> +# Mask mmx for media-libs/mlt +# assembler is not 64bits compliant (yet) +media-libs/mlt mmx + +# 8 Aug 2008: Alexis Ballier <aballier@gentoo.org> +# x86 asm only, it won't be built on amd64 if mmx useflag is enabled but that +# saves people from needlessly installing nasm +# Refs bug #93279 +media-sound/lame mmx + +# 12 Sep 2008; Gordon Malm <gengor@gentoo.org> +# x86-specific SIMD/asm, bugs #193022 and #207685 +media-sound/mpg123 mmx 3dnow 3dnowext sse + +# 26 Mar 2009: Gordon Malm <gengor@gentoo.org> +# This version fails if <gcc-4.2, subsequent versions do not +=x11-libs/pixman-0.12.0 sse2 + +# Oct 24th 2006; blubb@gentoo.org +# bug 152646 +x11-themes/polymer mmx sse2 + +# Oct 23th 2006; blubb@gentoo.org +# x86 asm only: +games-emulation/xmame mmx +games-emulation/xmess mmx +media-gfx/inkscape mmx +media-libs/allegro mmx sse +media-libs/libfame mmx +media-libs/libmovtar mmx +media-libs/sdl-gfx mmx +media-libs/smpeg mmx +media-video/mjpegtools mmx +net-irc/xchat mmx +net-irc/xchat-gnome mmx +net-misc/asterisk mmx +x11-terms/eterm mmx +media-tv/xawtv mmx diff --git a/hardened/amd64/packages b/hardened/amd64/packages new file mode 100644 index 00000000..95abedbf --- /dev/null +++ b/hardened/amd64/packages @@ -0,0 +1,6 @@ +*>=sys-devel/binutils-2.13.90.0.4 + +>=x11-base/xorg-x11-6.8.0-r4 + +*sys-devel/libtool +*virtual/dev-manager diff --git a/hardened/amd64/parent b/hardened/amd64/parent new file mode 100644 index 00000000..f3229c5b --- /dev/null +++ b/hardened/amd64/parent @@ -0,0 +1 @@ +.. diff --git a/hardened/amd64/profile.bashrc b/hardened/amd64/profile.bashrc new file mode 100644 index 00000000..a23dacf8 --- /dev/null +++ b/hardened/amd64/profile.bashrc @@ -0,0 +1,5 @@ +# fix for bug 60147, "configure causes sandbox violations when lib64 +# is a directory". currently only works with cvs portage. +#SANDBOX_WRITE="${SANDBOX_WRITE}:/usr/lib64/conftest:/usr/lib64/cf" +addwrite /usr/lib64/conftest +addwrite /usr/lib64/cf diff --git a/hardened/amd64/use.mask b/hardened/amd64/use.mask new file mode 100644 index 00000000..cea72581 --- /dev/null +++ b/hardened/amd64/use.mask @@ -0,0 +1,110 @@ +# Copyright 2006-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/amd64/use.mask,v 1.32 2009/07/06 00:02:56 gengor Exp $ + +multilib + +# SIMD +-3dnow +-3dnowext +-mmx +-mmxext +-sse +-sse2 +-sse3 +-ssse3 + +# UNKNOWN - SECTION +afs +drac + +# UNMASK - SECTION + +# media-libs/libemf only works by luck (see bug #127328) +# this flag makes media-gfx/inkscape dep on media-gfx/pstoedit +# which deps on libemf +plugin + +# 2005/12/01 - Daniel Gryniewicz <dang@gentoo.org> +# There is now a kqemu that works and is stable on amd64 +-kqemu + +# 2006/03/03 - Luca Barbato <lu_zero@gentoo.org> +# codec support x264 +-x264 + +# 2006/02/05 - Donnie Berkholz <dberkholz@gentoo.org> +# Modular X: mask for architectures on which they aren't available +video_cards_i740 +video_cards_imstt +video_cards_newport +video_cards_nsc + +# 2006/01/28 - Donnie Berkholz <dberkholz@gentoo.org> +# Modular X: unmask for architectures on which they are available +-input_devices_synaptics +-input_devices_vmmouse +-input_devices_wacom +-video_cards_fglrx +-video_cards_vmware + +# WON'T WORK - SECTION + +# 2007/04/07 - Petteri Räty <betelgeuse@gentoo.org> +# libemf does not build on amd64 +emf + +asm + +# WON'T BUILD - SECTION + +# 2007/08/24 Michael Marineau <marineam@gentoo.org> +# Xen HVM support requires building 32-bit binaries. +hvm + +# 2007/01/18 - Jeffrey Gardner <je_fro@gentoo.org> +# Mask gamess support temporarily. +gamess + +# 2006/12/21 - Diego Pettenò <flameeyes@gentoo.org> +# Mask some ALSA cards that are known broken in AMD64 +alsa_cards_cs5535audio + +# 2006/09/05 - Tupone Alfredo <tupone@gentoo.org> +# doomsday ebuild is not available on this architecture +doomsday + +# 2005/09/19 - Olivier Fisette <ribosome@gentoo.org> +# cmucl is not available on amd64. Masking to keep "sci-mathematics/maxima" +# happy. +cmucl + +# 2004/11/13 - Tom Martin <slarti@gentoo.org> +# dev-libs/mzscheme won't build, #65216 +mzscheme + +# 2004/10/06 - Jeremy Huddleston <eradicator@gentoo.org> +# sys-cluster/pvm won't build +pvm + +# 2004/06/22 - Taken from 2004.0 profile +# Firebird doesnt build on amd64 + +# 2004/06/22 - Taken from 2004.0 profile +# masked +3dfx + +# NOT NECESSARY - SECTION + +# Unmask emul-linux-x86 +-emul-linux-x86 + +# Vidix support doesn't work on amd64 for now. +vidix + +# Diego Pettenò <flameeyes@gentoo.org> (4 Jan 2007) +# Unmask the flags for PHP that are available only on x86/amd64 +-oci8 +-oracle7 +#-firebird - commented since firebird has been pushed back to ~amd64 +-db2 diff --git a/hardened/amd64/virtuals b/hardened/amd64/virtuals new file mode 100644 index 00000000..1bdd6315 --- /dev/null +++ b/hardened/amd64/virtuals @@ -0,0 +1,5 @@ +# Copyright 1999-2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/amd64/virtuals,v 1.13 2007/12/26 21:35:44 phreak Exp $ + +virtual/bootloader sys-boot/grub-static diff --git a/hardened/ia64/deprecated b/hardened/ia64/deprecated new file mode 100644 index 00000000..b55ccb7d --- /dev/null +++ b/hardened/ia64/deprecated @@ -0,0 +1,7 @@ +hardened/linux/ia64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/ia64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/ia64/make.defaults b/hardened/ia64/make.defaults new file mode 100644 index 00000000..026f88ee --- /dev/null +++ b/hardened/ia64/make.defaults @@ -0,0 +1,28 @@ +# Copyright 1999-2007 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ia64/make.defaults,v 1.6 2009/08/16 22:09:14 remi Exp $ + +ARCH="ia64" +ACCEPT_KEYWORDS="ia64" + +CHOST="ia64-unknown-linux-gnu" +CFLAGS="-O2 -pipe" +CXXFLAGS="${CFLAGS}" + +FEATURES="sandbox sfperms" + +USE="berkdb crypt hardened pam pic readline ssl tcpd zlib" + +# 2006/08/18 - Donnie Berkholz <dberkholz@gentoo.org> +# Defaults for video drivers +VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 \ + imstt intel mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage \ + siliconmotion sis sisusb tdfx tga v4l vesa vga via voodoo" + +# 2006/12/23 - Diego Pettenò <flameeyes@gentoo.org> +# Defaults for audio drivers - Took from x86 profile +ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x \ + ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 \ + trident usb-audio via82xx via82xx-modem ymfpci" + +PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/hardened/ia64/" diff --git a/hardened/ia64/package.mask b/hardened/ia64/package.mask new file mode 100644 index 00000000..6281fd1f --- /dev/null +++ b/hardened/ia64/package.mask @@ -0,0 +1,5 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ia64/package.mask,v 1.2 2009/07/31 11:11:07 ssuominen Exp $ + +<sys-kernel/linux-headers-2.5 diff --git a/hardened/ia64/package.use.mask b/hardened/ia64/package.use.mask new file mode 100644 index 00000000..3355773e --- /dev/null +++ b/hardened/ia64/package.use.mask @@ -0,0 +1,7 @@ +# This file requires >=portage-2.1.1 + +# bug #147908 - unmask these on x86 profiles +>=dev-java/sun-jdk-1.5 -nsplugin +>=dev-java/sun-jre-bin-1.5 -nsplugin +>=dev-java/ibm-jdk-bin-1.5 -nsplugin +>=dev-java/ibm-jre-bin-1.5 -nsplugin diff --git a/hardened/ia64/packages b/hardened/ia64/packages new file mode 100644 index 00000000..a99a222d --- /dev/null +++ b/hardened/ia64/packages @@ -0,0 +1,10 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ia64/packages,v 1.3 2009/07/14 08:39:01 gengor Exp $ + +*>=sys-devel/binutils-2.13.90.0.4 + +>=x11-base/xorg-x11-6.8.0-r4 + +*sys-devel/libtool +*virtual/dev-manager diff --git a/hardened/ia64/parent b/hardened/ia64/parent new file mode 100644 index 00000000..f3229c5b --- /dev/null +++ b/hardened/ia64/parent @@ -0,0 +1 @@ +.. diff --git a/hardened/ia64/use.mask b/hardened/ia64/use.mask new file mode 100644 index 00000000..08d217c9 --- /dev/null +++ b/hardened/ia64/use.mask @@ -0,0 +1,22 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ia64/use.mask,v 1.4 2009/08/01 16:48:43 ssuominen Exp $ + +-3dnow +-3dnowext +-mmx +-mmxext +-sse +-sse2 +-win32codecs +-kqemu +-x264 + +# Copied from default-linux/x86 2006-04-02; bug #128490 +# Modular X: unmask for architectures on which they are available +-input_devices_synaptics +-input_devices_vmmouse +-video_cards_vmware + +# Modular X: mask for architectures on which they aren't available +video_cards_newport diff --git a/hardened/ia64/virtuals b/hardened/ia64/virtuals new file mode 100644 index 00000000..18e61703 --- /dev/null +++ b/hardened/ia64/virtuals @@ -0,0 +1,5 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ia64/virtuals,v 1.1 2007/04/29 07:08:56 solar Exp $ + +virtual/bootloader sys-boot/elilo diff --git a/hardened/linux/amd64/10.0/desktop/parent b/hardened/linux/amd64/10.0/desktop/parent new file mode 100644 index 00000000..ad6c5e12 --- /dev/null +++ b/hardened/linux/amd64/10.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/desktop diff --git a/hardened/linux/amd64/10.0/developer/parent b/hardened/linux/amd64/10.0/developer/parent new file mode 100644 index 00000000..4c893748 --- /dev/null +++ b/hardened/linux/amd64/10.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/developer diff --git a/hardened/linux/amd64/10.0/make.defaults b/hardened/linux/amd64/10.0/make.defaults new file mode 100644 index 00000000..f6a9e62e --- /dev/null +++ b/hardened/linux/amd64/10.0/make.defaults @@ -0,0 +1,9 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/10.0/make.defaults,v 1.1 2009/08/06 07:50:48 ssuominen Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened multilib nptl nptlonly pic" + +USE="-nls -unicode" + diff --git a/hardened/linux/amd64/10.0/no-multilib/make.defaults b/hardened/linux/amd64/10.0/no-multilib/make.defaults new file mode 100644 index 00000000..91d933df --- /dev/null +++ b/hardened/linux/amd64/10.0/no-multilib/make.defaults @@ -0,0 +1,10 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/10.0/no-multilib/make.defaults,v 1.1 2009/08/06 07:50:49 ssuominen Exp $ + +ARCH="amd64" +ACCEPT_KEYWORDS="${ARCH}" + +MULTILIB_ABIS="amd64" + +STAGE1_USE="hardened nptl nptlonly pic" diff --git a/hardened/linux/amd64/10.0/no-multilib/parent b/hardened/linux/amd64/10.0/no-multilib/parent new file mode 100644 index 00000000..52bcba73 --- /dev/null +++ b/hardened/linux/amd64/10.0/no-multilib/parent @@ -0,0 +1,2 @@ +.. +../../../../../features/64bit-native diff --git a/hardened/linux/amd64/10.0/parent b/hardened/linux/amd64/10.0/parent new file mode 100644 index 00000000..605d0438 --- /dev/null +++ b/hardened/linux/amd64/10.0/parent @@ -0,0 +1,2 @@ +.. +../../../../releases/10.0 diff --git a/hardened/linux/amd64/10.0/server/parent b/hardened/linux/amd64/10.0/server/parent new file mode 100644 index 00000000..c3990165 --- /dev/null +++ b/hardened/linux/amd64/10.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/server diff --git a/hardened/linux/amd64/2008.0/deprecated b/hardened/linux/amd64/2008.0/deprecated new file mode 100644 index 00000000..a4054a37 --- /dev/null +++ b/hardened/linux/amd64/2008.0/deprecated @@ -0,0 +1,7 @@ +hardened/linux/amd64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/amd64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/amd64/2008.0/desktop/deprecated b/hardened/linux/amd64/2008.0/desktop/deprecated new file mode 100644 index 00000000..a4054a37 --- /dev/null +++ b/hardened/linux/amd64/2008.0/desktop/deprecated @@ -0,0 +1,7 @@ +hardened/linux/amd64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/amd64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/amd64/2008.0/desktop/make.defaults b/hardened/linux/amd64/2008.0/desktop/make.defaults new file mode 100644 index 00000000..b11f236c --- /dev/null +++ b/hardened/linux/amd64/2008.0/desktop/make.defaults @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/2008.0/desktop/make.defaults,v 1.1 2009/08/06 17:58:48 ssuominen Exp $ + +# Samuli Suominen <ssuominen@gentoo.org> (06 Aug 2009) +# Deprecated since 10.0 profiles. +USE="esd qt3" diff --git a/hardened/linux/amd64/2008.0/desktop/parent b/hardened/linux/amd64/2008.0/desktop/parent new file mode 100644 index 00000000..ad6c5e12 --- /dev/null +++ b/hardened/linux/amd64/2008.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/desktop diff --git a/hardened/linux/amd64/2008.0/developer/deprecated b/hardened/linux/amd64/2008.0/developer/deprecated new file mode 100644 index 00000000..a4054a37 --- /dev/null +++ b/hardened/linux/amd64/2008.0/developer/deprecated @@ -0,0 +1,7 @@ +hardened/linux/amd64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/amd64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/amd64/2008.0/developer/parent b/hardened/linux/amd64/2008.0/developer/parent new file mode 100644 index 00000000..4c893748 --- /dev/null +++ b/hardened/linux/amd64/2008.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/developer diff --git a/hardened/linux/amd64/2008.0/make.defaults b/hardened/linux/amd64/2008.0/make.defaults new file mode 100644 index 00000000..faed7bb7 --- /dev/null +++ b/hardened/linux/amd64/2008.0/make.defaults @@ -0,0 +1,9 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/2008.0/make.defaults,v 1.1 2008/04/01 17:41:11 wolf31o2 Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened multilib nptl nptlonly pic" + +USE="-nls -unicode" + diff --git a/hardened/linux/amd64/2008.0/no-multilib/deprecated b/hardened/linux/amd64/2008.0/no-multilib/deprecated new file mode 100644 index 00000000..2ec537be --- /dev/null +++ b/hardened/linux/amd64/2008.0/no-multilib/deprecated @@ -0,0 +1,7 @@ +hardened/linux/amd64/10.0/no-multilib +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/amd64/10.0/no-multilib profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/amd64/2008.0/no-multilib/make.defaults b/hardened/linux/amd64/2008.0/no-multilib/make.defaults new file mode 100644 index 00000000..b4d6e380 --- /dev/null +++ b/hardened/linux/amd64/2008.0/no-multilib/make.defaults @@ -0,0 +1,10 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/2008.0/no-multilib/make.defaults,v 1.1 2008/04/01 17:41:13 wolf31o2 Exp $ + +ARCH="amd64" +ACCEPT_KEYWORDS="${ARCH}" + +MULTILIB_ABIS="amd64" + +STAGE1_USE="hardened nptl nptlonly pic" diff --git a/hardened/linux/amd64/2008.0/no-multilib/parent b/hardened/linux/amd64/2008.0/no-multilib/parent new file mode 100644 index 00000000..52bcba73 --- /dev/null +++ b/hardened/linux/amd64/2008.0/no-multilib/parent @@ -0,0 +1,2 @@ +.. +../../../../../features/64bit-native diff --git a/hardened/linux/amd64/2008.0/parent b/hardened/linux/amd64/2008.0/parent new file mode 100644 index 00000000..3c71bf2b --- /dev/null +++ b/hardened/linux/amd64/2008.0/parent @@ -0,0 +1,2 @@ +.. +../../../../releases/2008.0 diff --git a/hardened/linux/amd64/2008.0/server/deprecated b/hardened/linux/amd64/2008.0/server/deprecated new file mode 100644 index 00000000..a4054a37 --- /dev/null +++ b/hardened/linux/amd64/2008.0/server/deprecated @@ -0,0 +1,7 @@ +hardened/linux/amd64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/amd64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/amd64/2008.0/server/parent b/hardened/linux/amd64/2008.0/server/parent new file mode 100644 index 00000000..c3990165 --- /dev/null +++ b/hardened/linux/amd64/2008.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/server diff --git a/hardened/linux/amd64/make.defaults b/hardened/linux/amd64/make.defaults new file mode 100644 index 00000000..51e59c6c --- /dev/null +++ b/hardened/linux/amd64/make.defaults @@ -0,0 +1,8 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/make.defaults,v 1.2 2009/07/09 00:47:47 gengor Exp $ + +USE="justify" + +CFLAGS="-O2 -pipe" +CXXFLAGS="${CFLAGS}" diff --git a/hardened/linux/amd64/package.mask b/hardened/linux/amd64/package.mask new file mode 100644 index 00000000..cf25cf16 --- /dev/null +++ b/hardened/linux/amd64/package.mask @@ -0,0 +1,9 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/package.mask,v 1.1 2009/09/12 02:42:33 gengor Exp $ + +# These packages do more harm than good on hardened. +# Users with nVidia GPUs must use the OSS "nouveau" or "nv" Xorg drivers. +x11-drivers/nvidia-drivers +media-video/nvidia-settings +dev-util/nvidia-cuda-sdk diff --git a/hardened/linux/amd64/package.use.mask b/hardened/linux/amd64/package.use.mask new file mode 100644 index 00000000..4fad4210 --- /dev/null +++ b/hardened/linux/amd64/package.use.mask @@ -0,0 +1,30 @@ +# Copyright 1999-2009 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/package.use.mask,v 1.11 2009/09/28 02:09:07 flameeyes Exp $ + +# Markus Meier <maekke@gentoo.org> (19 Sep 2009) +# Mask media-gfx/blender[openmp] as it needs +# sys-devel/gcc[openmp] which isn't available yet +media-gfx/blender openmp + +# Thomas Sachau <tommy@gentoo.org> (09 Mar 2009) +# copy mask from arch/amd64 +# Mask dbus, hal, nas and scanner USE flags; +# Bug 203680 +# Mask GnuTLS (not available as 32-bit library) +app-emulation/wine dbus hal ldap nas scanner gnutls gphoto2 + +# cuda dont work on hardended +sci-misc/boinc cuda + +# 2008/08/01 Jean-Noël Rivasseau <elvanor@gentoo.org> +# Disabling gcj flag, no gcc-4.3.1 yet +dev-java/eclipse-ecj gcj + +# missing the necessary linux-headers dep +>=net-fs/netatalk-2.0.3-r3 xfs + +# Dawid Węgliński <cla@gentoo.org> +# Mask amarok2 useflag for net-im/kadu +# See bug #238487 for references +net-im/kadu amarok2 diff --git a/hardened/linux/amd64/parent b/hardened/linux/amd64/parent new file mode 100644 index 00000000..158dd88c --- /dev/null +++ b/hardened/linux/amd64/parent @@ -0,0 +1,3 @@ +../../../base +.. +../../../arch/amd64 diff --git a/hardened/linux/amd64/use.mask b/hardened/linux/amd64/use.mask new file mode 100644 index 00000000..772f8389 --- /dev/null +++ b/hardened/linux/amd64/use.mask @@ -0,0 +1,8 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/amd64/use.mask,v 1.4 2009/09/12 02:42:33 gengor Exp $ + +# Binary nvidia drivers are masked, USE flags must be too. +video_cards_nvidia +nvidia +vdpau diff --git a/hardened/linux/ia64/10.0/desktop/parent b/hardened/linux/ia64/10.0/desktop/parent new file mode 100644 index 00000000..ad6c5e12 --- /dev/null +++ b/hardened/linux/ia64/10.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/desktop diff --git a/hardened/linux/ia64/10.0/developer/parent b/hardened/linux/ia64/10.0/developer/parent new file mode 100644 index 00000000..4c893748 --- /dev/null +++ b/hardened/linux/ia64/10.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/developer diff --git a/hardened/linux/ia64/10.0/make.defaults b/hardened/linux/ia64/10.0/make.defaults new file mode 100644 index 00000000..62a931f0 --- /dev/null +++ b/hardened/linux/ia64/10.0/make.defaults @@ -0,0 +1,9 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/ia64/10.0/make.defaults,v 1.1 2009/08/06 07:54:18 ssuominen Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened nptl nptlonly pic" + +USE="-nls -unicode" + diff --git a/hardened/linux/ia64/10.0/parent b/hardened/linux/ia64/10.0/parent new file mode 100644 index 00000000..605d0438 --- /dev/null +++ b/hardened/linux/ia64/10.0/parent @@ -0,0 +1,2 @@ +.. +../../../../releases/10.0 diff --git a/hardened/linux/ia64/10.0/server/parent b/hardened/linux/ia64/10.0/server/parent new file mode 100644 index 00000000..c3990165 --- /dev/null +++ b/hardened/linux/ia64/10.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/server diff --git a/hardened/linux/ia64/2008.0/deprecated b/hardened/linux/ia64/2008.0/deprecated new file mode 100644 index 00000000..b55ccb7d --- /dev/null +++ b/hardened/linux/ia64/2008.0/deprecated @@ -0,0 +1,7 @@ +hardened/linux/ia64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/ia64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/ia64/2008.0/desktop/deprecated b/hardened/linux/ia64/2008.0/desktop/deprecated new file mode 100644 index 00000000..b55ccb7d --- /dev/null +++ b/hardened/linux/ia64/2008.0/desktop/deprecated @@ -0,0 +1,7 @@ +hardened/linux/ia64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/ia64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/ia64/2008.0/desktop/make.defaults b/hardened/linux/ia64/2008.0/desktop/make.defaults new file mode 100644 index 00000000..42abb429 --- /dev/null +++ b/hardened/linux/ia64/2008.0/desktop/make.defaults @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/ia64/2008.0/desktop/make.defaults,v 1.1 2009/08/06 17:59:29 ssuominen Exp $ + +# Samuli Suominen <ssuominen@gentoo.org> (06 Aug 2009) +# Deprecated since 10.0 profiles. +USE="esd qt3" diff --git a/hardened/linux/ia64/2008.0/desktop/parent b/hardened/linux/ia64/2008.0/desktop/parent new file mode 100644 index 00000000..ad6c5e12 --- /dev/null +++ b/hardened/linux/ia64/2008.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/desktop diff --git a/hardened/linux/ia64/2008.0/developer/deprecated b/hardened/linux/ia64/2008.0/developer/deprecated new file mode 100644 index 00000000..b55ccb7d --- /dev/null +++ b/hardened/linux/ia64/2008.0/developer/deprecated @@ -0,0 +1,7 @@ +hardened/linux/ia64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/ia64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/ia64/2008.0/developer/parent b/hardened/linux/ia64/2008.0/developer/parent new file mode 100644 index 00000000..4c893748 --- /dev/null +++ b/hardened/linux/ia64/2008.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/developer diff --git a/hardened/linux/ia64/2008.0/make.defaults b/hardened/linux/ia64/2008.0/make.defaults new file mode 100644 index 00000000..80e92282 --- /dev/null +++ b/hardened/linux/ia64/2008.0/make.defaults @@ -0,0 +1,9 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/ia64/2008.0/make.defaults,v 1.1 2008/04/01 17:41:15 wolf31o2 Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened nptl nptlonly pic" + +USE="-nls -unicode" + diff --git a/hardened/linux/ia64/2008.0/parent b/hardened/linux/ia64/2008.0/parent new file mode 100644 index 00000000..3c71bf2b --- /dev/null +++ b/hardened/linux/ia64/2008.0/parent @@ -0,0 +1,2 @@ +.. +../../../../releases/2008.0 diff --git a/hardened/linux/ia64/2008.0/server/deprecated b/hardened/linux/ia64/2008.0/server/deprecated new file mode 100644 index 00000000..b55ccb7d --- /dev/null +++ b/hardened/linux/ia64/2008.0/server/deprecated @@ -0,0 +1,7 @@ +hardened/linux/ia64/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/ia64/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/ia64/2008.0/server/parent b/hardened/linux/ia64/2008.0/server/parent new file mode 100644 index 00000000..c3990165 --- /dev/null +++ b/hardened/linux/ia64/2008.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/server diff --git a/hardened/linux/ia64/parent b/hardened/linux/ia64/parent new file mode 100644 index 00000000..10d6c4b3 --- /dev/null +++ b/hardened/linux/ia64/parent @@ -0,0 +1,3 @@ +../../../base +.. +../../../arch/ia64 diff --git a/hardened/linux/make.defaults b/hardened/linux/make.defaults new file mode 100644 index 00000000..3e89224e --- /dev/null +++ b/hardened/linux/make.defaults @@ -0,0 +1,8 @@ +# Copyright 1999-2009 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/make.defaults,v 1.7 2009/07/06 01:10:42 gengor Exp $ + +STAGE1_USE="hardened nptl nptlonly pic" + +# Can perhaps allow openmp when >gcc-4.2 is stable +USE="-fortran -openmp -ipv6 -nls hardened pic sysfs urandom" diff --git a/hardened/linux/package.mask b/hardened/linux/package.mask new file mode 100644 index 00000000..654e032f --- /dev/null +++ b/hardened/linux/package.mask @@ -0,0 +1,44 @@ +# Copyright 1999-2009 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/package.mask,v 1.24 2009/09/12 02:42:32 gengor Exp $ + +# Hardened versions of gcc-4.0* through gcc-4.2* are not available. +=sys-devel/gcc-4.0* +=sys-devel/gcc-4.1* +=sys-devel/gcc-4.2* + +# Mask non-hardened+non-testing gcc-4.3.x releases. +=sys-devel/gcc-4.3.2* + +# No hardened >=sys-devel/gcc-4.4 available. +>=sys-devel/gcc-4.4 + +# Requires gcc-4*, unmask when stable. Bug #217927. +media-libs/libopenraw +media-gfx/raw-thumbnailer +media-gfx/gnome-raw-thumbnailer + +# net-im/skype requires gcc-4* runtime. +net-im/skype +# Jeremy Olexa <darkside@gentoo.org> (20 Aug 2009) +# Depends on skype. Remove this block when the skype block is removed. +dev-python/skype4py +net-im/skysentials + +# >=sci-libs/acml-3.6 requires gcc-4*. +>=sci-libs/acml-3.6 + + +# Mask off glibc-2.4 until the approach for SSP compatibilty is +# resolved in a way that doesn't break running systems, and we +# have a sensible upgrade path. Advise having a static busybox +# around if you try it in a live system. +# 2006-03-13 kevquinn +=sys-libs/glibc-2.4* + +# Patch fails, mask for now. Bug #270274. +>=sys-libs/glibc-2.10 + +# Requires >=sys-libs/glibc-2.10 +=x11-libs/fltk-1.1.9-r1 +=x11-libs/fltk-2.0_pre6786-r1 diff --git a/hardened/linux/package.use.mask b/hardened/linux/package.use.mask new file mode 100644 index 00000000..ac8700f0 --- /dev/null +++ b/hardened/linux/package.use.mask @@ -0,0 +1,14 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/package.use.mask,v 1.5 2009/08/05 17:52:39 gengor Exp $ + +sys-devel/gcc -hardened +sys-libs/glibc -hardened + +# No -z now support? Bug #269288. +sys-devel/binutils gold + +# Fails with gcc-3.4.x SSP, bug #230415. +app-cdr/cdrdao gcdmaster + +www-apps/mediawiki math diff --git a/hardened/linux/parent b/hardened/linux/parent new file mode 100644 index 00000000..77ede283 --- /dev/null +++ b/hardened/linux/parent @@ -0,0 +1 @@ +../../default/linux diff --git a/hardened/linux/powerpc/make.defaults b/hardened/linux/powerpc/make.defaults new file mode 100644 index 00000000..96cbb6a2 --- /dev/null +++ b/hardened/linux/powerpc/make.defaults @@ -0,0 +1,5 @@ +# Copyright 2005-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/make.defaults,v 1.1 2008/04/01 17:41:18 wolf31o2 Exp $ + +FEATURES="-sandbox" diff --git a/hardened/linux/powerpc/package.mask b/hardened/linux/powerpc/package.mask new file mode 100644 index 00000000..acfd7061 --- /dev/null +++ b/hardened/linux/powerpc/package.mask @@ -0,0 +1,28 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/package.mask,v 1.7 2009/07/31 11:14:43 ssuominen Exp $ + +# Raúl Porcel <armin76@gentoo.org> (14 Jul 2008) +# Needs glibc-2.7 +>=sys-apps/iproute2-2.6.25.20080417 + +# Wulf C. Krueger <philantrop@gentoo.org> (22 Sep 2007) +# Needs OOo. +app-text/bibus + +# needs masked gcc +=sys-libs/glibc-2.5* +=sys-libs/glibc-2.6* +=sys-libs/glibc-2.7* +=sys-libs/glibc-2.8* + +# Requires glibc 2.4 or better +games-strategy/ufo-ai +sys-apps/openrc +>=sys-apps/baselayout-2 +# needs openrc +>=media-sound/pulseaudio-0.9.11 +# Needs gcc-4 +<=app-office/scribus-1.3.3.11 +<=media-gfx/yafray-0.9 + diff --git a/hardened/linux/powerpc/package.use.mask b/hardened/linux/powerpc/package.use.mask new file mode 100644 index 00000000..0b100f11 --- /dev/null +++ b/hardened/linux/powerpc/package.use.mask @@ -0,0 +1,10 @@ +# Jean-Noël Rivasseau <elvanor@gentoo.org> (01 Aug 2008) +# Disabling gcj flag, no gcc-4.3.1 yet +dev-java/eclipse-ecj gcj + +# Diego Pettenò <flameeyes@gentoo.org> (10 Nov 2007) +# Tests for Linux-PAM 0.99 require >=sys-libs/glibc-2.4 +>=sys-libs/pam-0.99.8 test +#Brent Baude <ranger@gentoo.org> (1 Feb 2008) +# Masking hb and hb2 USE flags as no suitable solution for evms exists +sys-fs/evms hb hb2 diff --git a/hardened/linux/powerpc/parent b/hardened/linux/powerpc/parent new file mode 100644 index 00000000..728caca7 --- /dev/null +++ b/hardened/linux/powerpc/parent @@ -0,0 +1,3 @@ +../../../base +.. +../../../arch/powerpc diff --git a/hardened/linux/powerpc/ppc32/10.0/desktop/parent b/hardened/linux/powerpc/ppc32/10.0/desktop/parent new file mode 100644 index 00000000..db8ce088 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/10.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/desktop diff --git a/hardened/linux/powerpc/ppc32/10.0/developer/parent b/hardened/linux/powerpc/ppc32/10.0/developer/parent new file mode 100644 index 00000000..5c8258a7 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/10.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/developer diff --git a/hardened/linux/powerpc/ppc32/10.0/make.defaults b/hardened/linux/powerpc/ppc32/10.0/make.defaults new file mode 100644 index 00000000..a01bbcdf --- /dev/null +++ b/hardened/linux/powerpc/ppc32/10.0/make.defaults @@ -0,0 +1,9 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc32/10.0/make.defaults,v 1.1 2009/08/06 08:01:45 ssuominen Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened nptl nptlonly pic" + +USE="-nls -unicode" + diff --git a/hardened/linux/powerpc/ppc32/10.0/parent b/hardened/linux/powerpc/ppc32/10.0/parent new file mode 100644 index 00000000..8ae9641a --- /dev/null +++ b/hardened/linux/powerpc/ppc32/10.0/parent @@ -0,0 +1,2 @@ +.. +../../../../../releases/10.0 diff --git a/hardened/linux/powerpc/ppc32/10.0/server/parent b/hardened/linux/powerpc/ppc32/10.0/server/parent new file mode 100644 index 00000000..2e085a6e --- /dev/null +++ b/hardened/linux/powerpc/ppc32/10.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/server diff --git a/hardened/linux/powerpc/ppc32/2008.0/deprecated b/hardened/linux/powerpc/ppc32/2008.0/deprecated new file mode 100644 index 00000000..d0027215 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc32/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc32/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc32/2008.0/desktop/deprecated b/hardened/linux/powerpc/ppc32/2008.0/desktop/deprecated new file mode 100644 index 00000000..d0027215 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/desktop/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc32/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc32/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc32/2008.0/desktop/make.defaults b/hardened/linux/powerpc/ppc32/2008.0/desktop/make.defaults new file mode 100644 index 00000000..9c28a8cf --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/desktop/make.defaults @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc32/2008.0/desktop/make.defaults,v 1.1 2009/08/06 18:02:10 ssuominen Exp $ + +# Samuli Suominen <ssuominen@gentoo.org> (06 Aug 2009) +# Deprecated since 10.0 profiles. +USE="esd qt3" diff --git a/hardened/linux/powerpc/ppc32/2008.0/desktop/parent b/hardened/linux/powerpc/ppc32/2008.0/desktop/parent new file mode 100644 index 00000000..db8ce088 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/desktop diff --git a/hardened/linux/powerpc/ppc32/2008.0/developer/deprecated b/hardened/linux/powerpc/ppc32/2008.0/developer/deprecated new file mode 100644 index 00000000..d0027215 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/developer/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc32/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc32/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc32/2008.0/developer/parent b/hardened/linux/powerpc/ppc32/2008.0/developer/parent new file mode 100644 index 00000000..5c8258a7 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/developer diff --git a/hardened/linux/powerpc/ppc32/2008.0/make.defaults b/hardened/linux/powerpc/ppc32/2008.0/make.defaults new file mode 100644 index 00000000..144c58ca --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/make.defaults @@ -0,0 +1,9 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc32/2008.0/make.defaults,v 1.1 2008/04/01 17:41:19 wolf31o2 Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened nptl nptlonly pic" + +USE="-nls -unicode" + diff --git a/hardened/linux/powerpc/ppc32/2008.0/parent b/hardened/linux/powerpc/ppc32/2008.0/parent new file mode 100644 index 00000000..cfe87f7a --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/parent @@ -0,0 +1,2 @@ +.. +../../../../../releases/2008.0 diff --git a/hardened/linux/powerpc/ppc32/2008.0/server/deprecated b/hardened/linux/powerpc/ppc32/2008.0/server/deprecated new file mode 100644 index 00000000..d0027215 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/server/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc32/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc32/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc32/2008.0/server/parent b/hardened/linux/powerpc/ppc32/2008.0/server/parent new file mode 100644 index 00000000..2e085a6e --- /dev/null +++ b/hardened/linux/powerpc/ppc32/2008.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/server diff --git a/hardened/linux/powerpc/ppc32/parent b/hardened/linux/powerpc/ppc32/parent new file mode 100644 index 00000000..dd20c2a8 --- /dev/null +++ b/hardened/linux/powerpc/ppc32/parent @@ -0,0 +1,2 @@ +.. +../../../../arch/powerpc/ppc32 diff --git a/hardened/linux/powerpc/ppc64/10.0/32bit-userland/desktop/parent b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/desktop/parent new file mode 100644 index 00000000..fae96e8d --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/desktop diff --git a/hardened/linux/powerpc/ppc64/10.0/32bit-userland/developer/parent b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/developer/parent new file mode 100644 index 00000000..4bb06e40 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/developer diff --git a/hardened/linux/powerpc/ppc64/10.0/32bit-userland/make.defaults b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/make.defaults new file mode 100644 index 00000000..71ca74da --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/make.defaults @@ -0,0 +1,8 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/10.0/32bit-userland/make.defaults,v 1.1 2009/08/06 08:07:06 ssuominen Exp $ + +# All extra USE/etc should be specified in sub-profiles. +# DO NOT POLLUTE USE ON THIS PROFILE. + +ACCEPT_KEYWORDS="-* ${ARCH}" diff --git a/hardened/linux/powerpc/ppc64/10.0/32bit-userland/parent b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/parent new file mode 100644 index 00000000..7947ae88 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/parent @@ -0,0 +1,2 @@ +.. +../../../../../../features/32bit-userland diff --git a/hardened/linux/powerpc/ppc64/10.0/32bit-userland/server/parent b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/server/parent new file mode 100644 index 00000000..8c11cb52 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/server diff --git a/hardened/linux/powerpc/ppc64/10.0/32bit-userland/use.mask b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/use.mask new file mode 100644 index 00000000..9b09de2d --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/32bit-userland/use.mask @@ -0,0 +1,2 @@ +# We mask this since we're not really a multilib profile +multilib diff --git a/hardened/linux/powerpc/ppc64/10.0/64bit-userland/desktop/parent b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/desktop/parent new file mode 100644 index 00000000..fae96e8d --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/desktop diff --git a/hardened/linux/powerpc/ppc64/10.0/64bit-userland/developer/parent b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/developer/parent new file mode 100644 index 00000000..4bb06e40 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/developer diff --git a/hardened/linux/powerpc/ppc64/10.0/64bit-userland/parent b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/parent new file mode 100644 index 00000000..2479a24f --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/parent @@ -0,0 +1,2 @@ +.. +../../../../../../features/64bit-native diff --git a/hardened/linux/powerpc/ppc64/10.0/64bit-userland/server/parent b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/server/parent new file mode 100644 index 00000000..8c11cb52 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/server diff --git a/hardened/linux/powerpc/ppc64/10.0/64bit-userland/use.mask b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/use.mask new file mode 100644 index 00000000..6c918ff2 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/use.mask @@ -0,0 +1,2 @@ +# We mask this since we don't have a stable sys-process/audit yet +audit diff --git a/hardened/linux/powerpc/ppc64/10.0/64bit-userland/virtuals b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/virtuals new file mode 100644 index 00000000..64956b2f --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/64bit-userland/virtuals @@ -0,0 +1,5 @@ +# Copyright 2004-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License, v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/10.0/64bit-userland/virtuals,v 1.1 2009/08/06 08:07:11 ssuominen Exp $ + +virtual/bootloader sys-boot/yaboot-static diff --git a/hardened/linux/powerpc/ppc64/10.0/desktop/parent b/hardened/linux/powerpc/ppc64/10.0/desktop/parent new file mode 100644 index 00000000..db8ce088 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/desktop diff --git a/hardened/linux/powerpc/ppc64/10.0/developer/parent b/hardened/linux/powerpc/ppc64/10.0/developer/parent new file mode 100644 index 00000000..5c8258a7 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/developer diff --git a/hardened/linux/powerpc/ppc64/10.0/make.defaults b/hardened/linux/powerpc/ppc64/10.0/make.defaults new file mode 100644 index 00000000..bb1869e7 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/make.defaults @@ -0,0 +1,9 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/10.0/make.defaults,v 1.1 2009/08/06 08:07:04 ssuominen Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened nptl nptlonly pic" + +USE="-nls -unicode" + diff --git a/hardened/linux/powerpc/ppc64/10.0/parent b/hardened/linux/powerpc/ppc64/10.0/parent new file mode 100644 index 00000000..8ae9641a --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/parent @@ -0,0 +1,2 @@ +.. +../../../../../releases/10.0 diff --git a/hardened/linux/powerpc/ppc64/10.0/server/parent b/hardened/linux/powerpc/ppc64/10.0/server/parent new file mode 100644 index 00000000..2e085a6e --- /dev/null +++ b/hardened/linux/powerpc/ppc64/10.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/server diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/deprecated b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/deprecated new file mode 100644 index 00000000..1bd211dc --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/32bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/32bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/deprecated b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/deprecated new file mode 100644 index 00000000..1bd211dc --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/32bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/32bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/make.defaults b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/make.defaults new file mode 100644 index 00000000..848d59aa --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/make.defaults @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/make.defaults,v 1.1 2009/08/06 18:02:11 ssuominen Exp $ + +# Samuli Suominen <ssuominen@gentoo.org> (06 Aug 2009) +# Deprecated since 10.0 profiles. +USE="esd qt3" diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/parent b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/parent new file mode 100644 index 00000000..fae96e8d --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/desktop diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/developer/deprecated b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/developer/deprecated new file mode 100644 index 00000000..1bd211dc --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/developer/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/32bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/32bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/developer/parent b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/developer/parent new file mode 100644 index 00000000..4bb06e40 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/developer diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/make.defaults b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/make.defaults new file mode 100644 index 00000000..c6fedb2a --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/make.defaults @@ -0,0 +1,8 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/make.defaults,v 1.1 2008/04/01 17:41:23 wolf31o2 Exp $ + +# All extra USE/etc should be specified in sub-profiles. +# DO NOT POLLUTE USE ON THIS PROFILE. + +ACCEPT_KEYWORDS="-* ${ARCH}" diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/parent b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/parent new file mode 100644 index 00000000..7947ae88 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/parent @@ -0,0 +1,2 @@ +.. +../../../../../../features/32bit-userland diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/server/deprecated b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/server/deprecated new file mode 100644 index 00000000..1bd211dc --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/server/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/32bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/32bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/server/parent b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/server/parent new file mode 100644 index 00000000..8c11cb52 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/server diff --git a/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/use.mask b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/use.mask new file mode 100644 index 00000000..9b09de2d --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/32bit-userland/use.mask @@ -0,0 +1,2 @@ +# We mask this since we're not really a multilib profile +multilib diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/deprecated b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/deprecated new file mode 100644 index 00000000..9f45ffd5 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/64bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/64bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/deprecated b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/deprecated new file mode 100644 index 00000000..9f45ffd5 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/64bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/64bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/make.defaults b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/make.defaults new file mode 100644 index 00000000..409a68e0 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/make.defaults @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/make.defaults,v 1.1 2009/08/06 18:02:11 ssuominen Exp $ + +# Samuli Suominen <ssuominen@gentoo.org> (06 Aug 2009) +# Deprecated since 10.0 profiles. +USE="esd qt3" diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/parent b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/parent new file mode 100644 index 00000000..fae96e8d --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/desktop diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/developer/deprecated b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/developer/deprecated new file mode 100644 index 00000000..9f45ffd5 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/developer/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/64bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/64bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/developer/parent b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/developer/parent new file mode 100644 index 00000000..4bb06e40 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/developer diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/parent b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/parent new file mode 100644 index 00000000..2479a24f --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/parent @@ -0,0 +1,2 @@ +.. +../../../../../../features/64bit-native diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/server/deprecated b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/server/deprecated new file mode 100644 index 00000000..9f45ffd5 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/server/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/64bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/64bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/server/parent b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/server/parent new file mode 100644 index 00000000..8c11cb52 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../../../targets/server diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/use.mask b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/use.mask new file mode 100644 index 00000000..6c918ff2 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/use.mask @@ -0,0 +1,2 @@ +# We mask this since we don't have a stable sys-process/audit yet +audit diff --git a/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/virtuals b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/virtuals new file mode 100644 index 00000000..39ec233b --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/virtuals @@ -0,0 +1,5 @@ +# Copyright 2004-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License, v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/2008.0/64bit-userland/virtuals,v 1.1 2008/04/01 17:41:26 wolf31o2 Exp $ + +virtual/bootloader sys-boot/yaboot-static diff --git a/hardened/linux/powerpc/ppc64/2008.0/deprecated b/hardened/linux/powerpc/ppc64/2008.0/deprecated new file mode 100644 index 00000000..465abd5f --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/deprecated @@ -0,0 +1,8 @@ +hardened/linux/powerpc/ppc64/10.0 +# Example change to hardened/linux/powerpc/ppc64/10.0 profile: +# cd /etc +# rm make.profile +# ln -s ../usr/portage/profiles/hardened/linux/powerpc/ppc64/10.0 make.profile +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/desktop/deprecated b/hardened/linux/powerpc/ppc64/2008.0/desktop/deprecated new file mode 100644 index 00000000..465abd5f --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/desktop/deprecated @@ -0,0 +1,8 @@ +hardened/linux/powerpc/ppc64/10.0 +# Example change to hardened/linux/powerpc/ppc64/10.0 profile: +# cd /etc +# rm make.profile +# ln -s ../usr/portage/profiles/hardened/linux/powerpc/ppc64/10.0 make.profile +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/desktop/make.defaults b/hardened/linux/powerpc/ppc64/2008.0/desktop/make.defaults new file mode 100644 index 00000000..69b65658 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/desktop/make.defaults @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/2008.0/desktop/make.defaults,v 1.1 2009/08/06 18:02:11 ssuominen Exp $ + +# Samuli Suominen <ssuominen@gentoo.org> (06 Aug 2009) +# Deprecated since 10.0 profiles. +USE="esd qt3" diff --git a/hardened/linux/powerpc/ppc64/2008.0/desktop/parent b/hardened/linux/powerpc/ppc64/2008.0/desktop/parent new file mode 100644 index 00000000..db8ce088 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/desktop diff --git a/hardened/linux/powerpc/ppc64/2008.0/developer/deprecated b/hardened/linux/powerpc/ppc64/2008.0/developer/deprecated new file mode 100644 index 00000000..465abd5f --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/developer/deprecated @@ -0,0 +1,8 @@ +hardened/linux/powerpc/ppc64/10.0 +# Example change to hardened/linux/powerpc/ppc64/10.0 profile: +# cd /etc +# rm make.profile +# ln -s ../usr/portage/profiles/hardened/linux/powerpc/ppc64/10.0 make.profile +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/developer/parent b/hardened/linux/powerpc/ppc64/2008.0/developer/parent new file mode 100644 index 00000000..5c8258a7 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/developer diff --git a/hardened/linux/powerpc/ppc64/2008.0/make.defaults b/hardened/linux/powerpc/ppc64/2008.0/make.defaults new file mode 100644 index 00000000..cf0f6ce1 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/make.defaults @@ -0,0 +1,9 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/2008.0/make.defaults,v 1.1 2008/04/01 17:41:22 wolf31o2 Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened nptl nptlonly pic" + +USE="-nls -unicode" + diff --git a/hardened/linux/powerpc/ppc64/2008.0/parent b/hardened/linux/powerpc/ppc64/2008.0/parent new file mode 100644 index 00000000..cfe87f7a --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/parent @@ -0,0 +1,2 @@ +.. +../../../../../releases/2008.0 diff --git a/hardened/linux/powerpc/ppc64/2008.0/server/deprecated b/hardened/linux/powerpc/ppc64/2008.0/server/deprecated new file mode 100644 index 00000000..465abd5f --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/server/deprecated @@ -0,0 +1,8 @@ +hardened/linux/powerpc/ppc64/10.0 +# Example change to hardened/linux/powerpc/ppc64/10.0 profile: +# cd /etc +# rm make.profile +# ln -s ../usr/portage/profiles/hardened/linux/powerpc/ppc64/10.0 make.profile +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/powerpc/ppc64/2008.0/server/parent b/hardened/linux/powerpc/ppc64/2008.0/server/parent new file mode 100644 index 00000000..2e085a6e --- /dev/null +++ b/hardened/linux/powerpc/ppc64/2008.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../../targets/server diff --git a/hardened/linux/powerpc/ppc64/parent b/hardened/linux/powerpc/ppc64/parent new file mode 100644 index 00000000..7990a758 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/parent @@ -0,0 +1,3 @@ +.. +../../../../arch/powerpc/ppc64/64ul +../../../../features/64bit-native diff --git a/hardened/linux/powerpc/ppc64/use.mask b/hardened/linux/powerpc/ppc64/use.mask new file mode 100644 index 00000000..5a7aa780 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/use.mask @@ -0,0 +1,58 @@ +# this is a list of USE flags +# that should not be used on PPC64 +# Tom Gall <tgall@gentoo.org> manages this list +mplayer +ruby + +# should be ok +jikes +junit + +guile + +# need to test libaio +aio +# needs some asm written +ocaml + +# until media-libs/portaudio is keyworded for ppc64 +portaudio + +# mask mozilla/firefox (bug #108020) +mozilla +firefox +seamonkey + +# 2006/03/20 - Donnie Berkholz <dberkholz@gentoo.org> +# Modular X: mask for architectures on which they aren't available +video_cards_apm +video_cards_ark +video_cards_cyrix +video_cards_i128 +video_cards_i740 +video_cards_intel +video_cards_neomagic +video_cards_nsc +video_cards_rendition +video_cards_siliconmotion +video_cards_sis +video_cards_tga +video_cards_tseng +video_cards_vesa +video_cards_vga +video_cards_via + +# Masked p2p for bug #155302 <josejx@gentoo.org> +p2p + +# 02 Dec 2006; Tony Vroon <chainsaw@gentoo.org> +# Keywording wpa_supplicant, but I don't have madwifi(-ng) hardware to test with, only BCM4306. +madwifi + +# mask qt4 (does not work) - bug #178779 +qt4 + +# USE=audit masked prior to testing on alpha, arm, hppa, ppc64, s390, sh. +# Bug #184563, 18 Sep 2007 +# Robin H. Johnson <robbat2@gentoo.org> +audit diff --git a/hardened/linux/powerpc/ppc64/virtuals b/hardened/linux/powerpc/ppc64/virtuals new file mode 100644 index 00000000..0bd052c5 --- /dev/null +++ b/hardened/linux/powerpc/ppc64/virtuals @@ -0,0 +1,5 @@ +# Copyright 2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/powerpc/ppc64/virtuals,v 1.1 2008/04/01 17:41:22 wolf31o2 Exp $ + +virtual/bootloader sys-boot/yaboot-static diff --git a/hardened/linux/use.mask b/hardened/linux/use.mask new file mode 100644 index 00000000..6344e525 --- /dev/null +++ b/hardened/linux/use.mask @@ -0,0 +1,16 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/use.mask,v 1.8 2009/09/12 02:42:32 gengor Exp $ + +-hardened + +emul-linux-x86 + +# supported only by gcc-4, unmask when it's stable wrt #217927 +raw + +# tcc is x86-only +tcc + +# precompiled headers are not compat with ASLR. +pch diff --git a/hardened/linux/virtuals b/hardened/linux/virtuals new file mode 100644 index 00000000..3bf8dc10 --- /dev/null +++ b/hardened/linux/virtuals @@ -0,0 +1,6 @@ +# Copyright 1999-2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/virtuals,v 1.1 2008/04/01 17:41:10 wolf31o2 Exp $ + +virtual/alsa sys-kernel/hardened-sources +virtual/linux-sources sys-kernel/hardened-sources diff --git a/hardened/linux/x86/10.0/desktop/parent b/hardened/linux/x86/10.0/desktop/parent new file mode 100644 index 00000000..ad6c5e12 --- /dev/null +++ b/hardened/linux/x86/10.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/desktop diff --git a/hardened/linux/x86/10.0/developer/parent b/hardened/linux/x86/10.0/developer/parent new file mode 100644 index 00000000..4c893748 --- /dev/null +++ b/hardened/linux/x86/10.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/developer diff --git a/hardened/linux/x86/10.0/make.defaults b/hardened/linux/x86/10.0/make.defaults new file mode 100644 index 00000000..5d1c665e --- /dev/null +++ b/hardened/linux/x86/10.0/make.defaults @@ -0,0 +1,8 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/x86/10.0/make.defaults,v 1.1 2009/08/06 07:58:35 ssuominen Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened nptl nptlonly pic" + +USE="-unicode" diff --git a/hardened/linux/x86/10.0/no-nptl/parent b/hardened/linux/x86/10.0/no-nptl/parent new file mode 100644 index 00000000..0627a62b --- /dev/null +++ b/hardened/linux/x86/10.0/no-nptl/parent @@ -0,0 +1,2 @@ +.. +../../../../../features/no-nptl diff --git a/hardened/linux/x86/10.0/parent b/hardened/linux/x86/10.0/parent new file mode 100644 index 00000000..605d0438 --- /dev/null +++ b/hardened/linux/x86/10.0/parent @@ -0,0 +1,2 @@ +.. +../../../../releases/10.0 diff --git a/hardened/linux/x86/10.0/server/parent b/hardened/linux/x86/10.0/server/parent new file mode 100644 index 00000000..c3990165 --- /dev/null +++ b/hardened/linux/x86/10.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/server diff --git a/hardened/linux/x86/2008.0/deprecated b/hardened/linux/x86/2008.0/deprecated new file mode 100644 index 00000000..6920ba0c --- /dev/null +++ b/hardened/linux/x86/2008.0/deprecated @@ -0,0 +1,7 @@ +hardened/linux/x86/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/x86/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/x86/2008.0/desktop/deprecated b/hardened/linux/x86/2008.0/desktop/deprecated new file mode 100644 index 00000000..6920ba0c --- /dev/null +++ b/hardened/linux/x86/2008.0/desktop/deprecated @@ -0,0 +1,7 @@ +hardened/linux/x86/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/x86/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/x86/2008.0/desktop/make.defaults b/hardened/linux/x86/2008.0/desktop/make.defaults new file mode 100644 index 00000000..48a2daf6 --- /dev/null +++ b/hardened/linux/x86/2008.0/desktop/make.defaults @@ -0,0 +1,7 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/x86/2008.0/desktop/make.defaults,v 1.2 2009/08/08 00:55:28 solar Exp $ + +# Samuli Suominen <ssuominen@gentoo.org> (06 Aug 2009) +# Deprecated since 10.0 profiles. +USE="esd" diff --git a/hardened/linux/x86/2008.0/desktop/parent b/hardened/linux/x86/2008.0/desktop/parent new file mode 100644 index 00000000..ad6c5e12 --- /dev/null +++ b/hardened/linux/x86/2008.0/desktop/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/desktop diff --git a/hardened/linux/x86/2008.0/developer/deprecated b/hardened/linux/x86/2008.0/developer/deprecated new file mode 100644 index 00000000..6920ba0c --- /dev/null +++ b/hardened/linux/x86/2008.0/developer/deprecated @@ -0,0 +1,7 @@ +hardened/linux/x86/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/x86/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/x86/2008.0/developer/parent b/hardened/linux/x86/2008.0/developer/parent new file mode 100644 index 00000000..4c893748 --- /dev/null +++ b/hardened/linux/x86/2008.0/developer/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/developer diff --git a/hardened/linux/x86/2008.0/make.defaults b/hardened/linux/x86/2008.0/make.defaults new file mode 100644 index 00000000..5baa4c83 --- /dev/null +++ b/hardened/linux/x86/2008.0/make.defaults @@ -0,0 +1,8 @@ +# Copyright 1999-2008 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/x86/2008.0/make.defaults,v 1.2 2008/04/21 20:11:14 phreak Exp $ + +# STAGE1_USE does not stack +STAGE1_USE="hardened nptl nptlonly pic" + +USE="-unicode" diff --git a/hardened/linux/x86/2008.0/no-nptl/deprecated b/hardened/linux/x86/2008.0/no-nptl/deprecated new file mode 100644 index 00000000..0760bb66 --- /dev/null +++ b/hardened/linux/x86/2008.0/no-nptl/deprecated @@ -0,0 +1,8 @@ +hardened/linux/x86/10.0/no-nptl +# Example change to hardened/linux/x86/10.0/no-nptl profile: +# cd /etc +# rm make.profile +# ln -s ../usr/portage/profiles/hardened/linux/x86/10.0/no-nptl make.profile +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/x86/2008.0/no-nptl/parent b/hardened/linux/x86/2008.0/no-nptl/parent new file mode 100644 index 00000000..0627a62b --- /dev/null +++ b/hardened/linux/x86/2008.0/no-nptl/parent @@ -0,0 +1,2 @@ +.. +../../../../../features/no-nptl diff --git a/hardened/linux/x86/2008.0/parent b/hardened/linux/x86/2008.0/parent new file mode 100644 index 00000000..3c71bf2b --- /dev/null +++ b/hardened/linux/x86/2008.0/parent @@ -0,0 +1,2 @@ +.. +../../../../releases/2008.0 diff --git a/hardened/linux/x86/2008.0/server/deprecated b/hardened/linux/x86/2008.0/server/deprecated new file mode 100644 index 00000000..6920ba0c --- /dev/null +++ b/hardened/linux/x86/2008.0/server/deprecated @@ -0,0 +1,7 @@ +hardened/linux/x86/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/x86/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/linux/x86/2008.0/server/parent b/hardened/linux/x86/2008.0/server/parent new file mode 100644 index 00000000..c3990165 --- /dev/null +++ b/hardened/linux/x86/2008.0/server/parent @@ -0,0 +1,2 @@ +.. +../../../../../targets/server diff --git a/hardened/linux/x86/make.defaults b/hardened/linux/x86/make.defaults new file mode 100644 index 00000000..d32381d5 --- /dev/null +++ b/hardened/linux/x86/make.defaults @@ -0,0 +1,25 @@ +# Copyright 1999-2006 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/x86/make.defaults,v 1.5 2009/08/16 22:09:14 remi Exp $ + +ARCH="x86" +ACCEPT_KEYWORDS="x86" + +CHOST="i686-pc-linux-gnu" +CFLAGS="-march=i686 -O2 -pipe" +CXXFLAGS="${CFLAGS}" + +USE="berkdb crypt hardened nptl nptlonly pam pic readline ssl tcpd zlib" + +# 2006/08/18 - Donnie Berkholz <dberkholz@gentoo.org> +# Defaults for video drivers +VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 imstt intel \ + mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage \ + siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware \ + voodoo" + +# 2006/12/21 - Andrej Kacian <ticho@gentoo.org> +# Defaults for audio drivers +ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 \ + emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m \ + maestro3 trident usb-audio via82xx via82xx-modem ymfpci" diff --git a/hardened/linux/x86/minimal/make.defaults b/hardened/linux/x86/minimal/make.defaults new file mode 100644 index 00000000..04163169 --- /dev/null +++ b/hardened/linux/x86/minimal/make.defaults @@ -0,0 +1,15 @@ +# Copyright 2007 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/x86/minimal/make.defaults,v 1.2 2009/07/09 00:47:49 gengor Exp $ + +# - TESTING PROFILE - TESTING PROFILE - +# ------ USE AT YOUR OWN RISK ------ + +USE="-* crypt hardened minimal multicall ncurses pic readline zlib" +PORTDIR=/usr/portage +PKGDIR=${PORTDIR}/packages/${ARCH}/ + +CFLAGS="-march=i686 -Os -pipe" +CXXFLAGS="${CFLAGS}" +FEATURES="nodoc noinfo noman" + diff --git a/hardened/linux/x86/minimal/parent b/hardened/linux/x86/minimal/parent new file mode 100644 index 00000000..f3229c5b --- /dev/null +++ b/hardened/linux/x86/minimal/parent @@ -0,0 +1 @@ +.. diff --git a/hardened/linux/x86/minimal/use.mask b/hardened/linux/x86/minimal/use.mask new file mode 100644 index 00000000..6645969e --- /dev/null +++ b/hardened/linux/x86/minimal/use.mask @@ -0,0 +1,2 @@ +pam +nls diff --git a/hardened/linux/x86/minimal/virtuals b/hardened/linux/x86/minimal/virtuals new file mode 100644 index 00000000..590fb849 --- /dev/null +++ b/hardened/linux/x86/minimal/virtuals @@ -0,0 +1 @@ +virtual/ssh net-misc/dropbear diff --git a/hardened/linux/x86/package.mask b/hardened/linux/x86/package.mask new file mode 100644 index 00000000..9a49c4ca --- /dev/null +++ b/hardened/linux/x86/package.mask @@ -0,0 +1,9 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/x86/package.mask,v 1.5 2009/09/12 02:42:34 gengor Exp $ + +# These packages do more harm than good on hardened. +# Users with nVidia GPUs must use the OSS "nouveau" or "nv" Xorg drivers. +x11-drivers/nvidia-drivers +media-video/nvidia-settings +dev-util/nvidia-cuda-sdk diff --git a/hardened/linux/x86/package.use.mask b/hardened/linux/x86/package.use.mask new file mode 100644 index 00000000..c4d8d607 --- /dev/null +++ b/hardened/linux/x86/package.use.mask @@ -0,0 +1,25 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/x86/package.use.mask,v 1.9 2009/09/19 10:58:08 maekke Exp $ + +# Markus Meier <maekke@gentoo.org> (19 Sep 2009) +# Mask media-gfx/blender[openmp] as it needs +# sys-devel/gcc[openmp] which isn't available yet +media-gfx/blender openmp + +# 26 Mar 2009: Gordon Malm <gengor@gentoo.org> +# This version fails if <gcc-4.2, subsequent versions do not +=x11-libs/pixman-0.12.0 sse2 + +# cuda does not work on hardended +sci-misc/boinc cuda + +# Jean-Noël Rivasseau <elvanor@gentoo.org> (01 Aug 2008) +# Disabling gcj flag, no gcc-4.3.1 yet +dev-java/eclipse-ecj gcj + +# cyrus-sasl doesn't work w/ USE=berkdb (#192753) +dev-libs/cyrus-sasl berkdb + +# missing the necessary linux-headers dep +>=net-fs/netatalk-2.0.3-r3 xfs diff --git a/hardened/linux/x86/parent b/hardened/linux/x86/parent new file mode 100644 index 00000000..03cb31ce --- /dev/null +++ b/hardened/linux/x86/parent @@ -0,0 +1,3 @@ +../../../base +.. +../../../arch/x86 diff --git a/hardened/linux/x86/use.mask b/hardened/linux/x86/use.mask new file mode 100644 index 00000000..c1122d53 --- /dev/null +++ b/hardened/linux/x86/use.mask @@ -0,0 +1,8 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/linux/x86/use.mask,v 1.4 2009/09/12 02:42:34 gengor Exp $ + +# Binary nvidia drivers are masked, USE flags must be too. +video_cards_nvidia +nvidia +vdpau diff --git a/hardened/make.defaults b/hardened/make.defaults new file mode 100644 index 00000000..1a5b8096 --- /dev/null +++ b/hardened/make.defaults @@ -0,0 +1,14 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/make.defaults,v 1.19 2009/07/07 18:26:48 gengor Exp $ + +STAGE1_USE="hardened pic" +USE="sysfs urandom xorg" +INPUT_DEVICES="mouse keyboard evdev" + +# 2008/07/09 - Doug Goldstein <cardoe@gentoo.org> +# Adding LDFLAGS="-Wl,-O1 for all Linux profiles by default +# after discussion on the gentoo-dev ML. As we bang out a clear +# direction with how LDFLAGS will be set by default, this entry +# may move. +LDFLAGS="-Wl,-O1" diff --git a/hardened/package.mask b/hardened/package.mask new file mode 100644 index 00000000..9318a158 --- /dev/null +++ b/hardened/package.mask @@ -0,0 +1,54 @@ +# Copyright 1999-2009 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/package.mask,v 1.64 2009/08/20 03:23:19 darkside Exp $ + +# Hardened versions of gcc-4.0* through gcc-4.2* are not available. +=sys-devel/gcc-4.0* +=sys-devel/gcc-4.1* +=sys-devel/gcc-4.2* + +# Mask non-hardened+non-testing gcc-4.3.x releases. +=sys-devel/gcc-4.3.2* + +# No hardened >=sys-devel/gcc-4.4 available. +>=sys-devel/gcc-4.4 + +# Requires gcc-4*, unmask when stable. Bug #217927. +media-libs/libopenraw +media-gfx/raw-thumbnailer +media-gfx/gnome-raw-thumbnailer + +# net-im/skype requires gcc-4* runtime. +net-im/skype +# Jeremy Olexa <darkside@gentoo.org> (20 Aug 2009) +# Depends on skype. Remove this block when the skype block is removed. +dev-python/skype4py +net-im/skysentials + +# >=sci-libs/acml-3.6 requires gcc-4*. +>=sci-libs/acml-3.6 + + +# Mask off glibc-2.4 until the approach for SSP compatibilty is +# resolved in a way that doesn't break running systems, and we +# have a sensible upgrade path. Advise having a static busybox +# around if you try it in a live system. +# 2006-03-13 kevquinn +=sys-libs/glibc-2.4* + +# Patch fails, mask for now. Bug #270274. +>=sys-libs/glibc-2.10 + +# Requires >=sys-libs/glibc-2.10 +=x11-libs/fltk-1.1.9-r1 +=x11-libs/fltk-2.0_pre6786-r1 + + +# These packages do more harm than good w/ hardened. +# Users must now the opensource xorg nv driver with nvidia cards +# by placing Driver "nv" in xorg.conf. +# 2006-06-29 solar +# 2009-08-07 chainsaw +x11-drivers/nvidia-drivers +media-video/nvidia-settings +dev-util/nvidia-cuda-sdk diff --git a/hardened/package.use b/hardened/package.use new file mode 100644 index 00000000..ce723aed --- /dev/null +++ b/hardened/package.use @@ -0,0 +1,6 @@ +# This file requires >=portage-2.1.1 + +# 26 Mar 2009: Gordon Malm <gengor@gentoo.org> +# Build gcc with mudflap ability if supported gcc version +sys-devel/gcc mudflap + diff --git a/hardened/package.use.mask b/hardened/package.use.mask new file mode 100644 index 00000000..4d9be4ff --- /dev/null +++ b/hardened/package.use.mask @@ -0,0 +1,14 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/package.use.mask,v 1.22 2009/08/05 17:52:39 gengor Exp $ + +sys-devel/gcc -hardened +sys-libs/glibc -hardened + +# No -z now support? Bug #269288. +sys-devel/binutils gold + +# Fails with gcc-3.4.x SSP, bug #230415. +app-cdr/cdrdao gcdmaster + +www-apps/mediawiki math diff --git a/hardened/packages b/hardened/packages new file mode 100644 index 00000000..34298ee1 --- /dev/null +++ b/hardened/packages @@ -0,0 +1,10 @@ +# Copyright 1999-2004 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/packages,v 1.11 2007/06/28 10:07:37 vapier Exp $ + +# This file extends the base packages file for the hardened profile. + +*sys-apps/man-pages +*sys-apps/util-linux +*sys-apps/busybox + diff --git a/hardened/packages.build b/hardened/packages.build new file mode 100644 index 00000000..7e584da5 --- /dev/null +++ b/hardened/packages.build @@ -0,0 +1,39 @@ +# Copyright 1999-2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/packages.build,v 1.4 2007/02/11 17:08:53 phreak Exp $ + +app-arch/bzip2 +app-arch/tar +app-shells/bash +net-misc/rsync +net-misc/wget +sys-apps/baselayout +sys-devel/autoconf +sys-devel/automake +sys-devel/libtool +sys-apps/coreutils +sys-apps/debianutils +sys-apps/diffutils +sys-apps/file +sys-apps/findutils +sys-apps/gawk +sys-apps/grep +sys-apps/less +sys-apps/net-tools +sys-apps/portage +sys-apps/sed +sys-apps/texinfo +sys-devel/binutils +sys-devel/bison +sys-devel/flex +sys-devel/gcc +sys-devel/gettext +sys-devel/gnuconfig +sys-devel/make +sys-devel/patch +dev-lang/perl +dev-lang/python +virtual/editor +virtual/gzip +virtual/libc +virtual/os-headers diff --git a/hardened/parent b/hardened/parent new file mode 100644 index 00000000..eb001c6e --- /dev/null +++ b/hardened/parent @@ -0,0 +1 @@ +../base diff --git a/hardened/ppc/README b/hardened/ppc/README new file mode 100644 index 00000000..75da7811 --- /dev/null +++ b/hardened/ppc/README @@ -0,0 +1,2 @@ +This profile is in testing only and results may very. +Please send feedback and patches to solar. diff --git a/hardened/ppc/deprecated b/hardened/ppc/deprecated new file mode 100644 index 00000000..d0027215 --- /dev/null +++ b/hardened/ppc/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc32/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc32/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/ppc/make.defaults b/hardened/ppc/make.defaults new file mode 100644 index 00000000..164a7ecb --- /dev/null +++ b/hardened/ppc/make.defaults @@ -0,0 +1,15 @@ +# Copyright 2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc/make.defaults,v 1.8 2009/03/27 22:33:47 solar Exp $ + +ARCH="ppc" +ACCEPT_KEYWORDS="${ARCH}" +USE="${ARCH} berkdb crypt hardened nls pam pic readline ssl tcpd zlib" + +# ppc +CHOST="powerpc-unknown-linux-gnu" +CFLAGS="-O2 -pipe" +CXXFLAGS="${CFLAGS}" +FEATURES="-sandbox" + +PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/hardened/ppc/" diff --git a/hardened/ppc/package.mask b/hardened/ppc/package.mask new file mode 100644 index 00000000..684cb468 --- /dev/null +++ b/hardened/ppc/package.mask @@ -0,0 +1,32 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc/package.mask,v 1.20 2009/08/05 06:01:57 ssuominen Exp $ + +# needs >=sys-devel/gcc-4.2 +sys-libs/libfreevec + +# Raúl Porcel <armin76@gentoo.org> (14 Jul 2008) +# Needs glibc-2.7 +>=sys-apps/iproute2-2.6.25.20080417 + +# Wulf C. Krueger <philantrop@gentoo.org> (22 Sep 2007) +# Needs OOo. +app-text/bibus + +# needs masked gcc +=sys-libs/glibc-2.5* +=sys-libs/glibc-2.6* +=sys-libs/glibc-2.7* +=sys-libs/glibc-2.8* + +# Doug Goldstein <cardoe@gentoo.org> (22 Apr 2008) +# >=sys-libs/glibc-2.5 is required for glibc-based installs +sys-apps/openrc +sys-apps/makedev +>=sys-apps/baselayout-2 + +# needs openrc +>=media-sound/pulseaudio-0.9.11 + +# Requires glibc 2.4 or better +games-strategy/ufo-ai diff --git a/hardened/ppc/package.use.mask b/hardened/ppc/package.use.mask new file mode 100644 index 00000000..3e94c775 --- /dev/null +++ b/hardened/ppc/package.use.mask @@ -0,0 +1,48 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc/package.use.mask,v 1.23 2009/07/31 11:13:27 ssuominen Exp $ + +# This file requires >=portage-2.1.1 + +# Joseph Jezak <josejx@gentoo.org> (Mar 20 2009) +# Mask Ruby -> Oracle bindings +dev-ruby/ruby-dbi oracle + +# Jean-Noël Rivasseau <elvanor@gentoo.org> (01 Aug 2008) +# Disabling gcj flag, no gcc-4.3.1 yet +dev-java/eclipse-ecj gcj + +# Mart Raudsepp <leio@gentoo.org> (02 Apr 2008) +# media-plugins/gst-plugins-{mythtv,dvb,fluendo-mpegdemux} not keyworded +# Joseph Jezak <josejx@gentoo.org> (27 Feb 2009) +# Marked ~ppc, but masking current versions because of stable keyword +<=media-plugins/gst-plugins-meta-0.10-r2 dvb mythtv + +# nixnut <nixnut@gentoo.org> (5 feb 2008) +# Masking hb and hb2 USE flags as no suitable solution for evms exists +sys-fs/evms hb hb2 + +# Piotr Jaroszyński <peper@gentoo.org> (19 Nov 2007) +# Mask python flag until ppc keyword is added to dev-python/pygments, bug #198989. +sys-apps/paludis python + +=dev-java/ibm-jdk-bin-1.5* -nsplugin +=dev-java/ibm-jre-bin-1.5* -nsplugin + +# Diego Pettenò <flameeyes@gentoo.org> (10 Nov 2007) +# Tests for Linux-PAM 0.99 require >=sys-libs/glibc-2.4 +>=sys-libs/pam-0.99.8 test + +# Samuli Suominen <drac@gentoo.org> (30 Nov 2007) +# media-libs/aften broken, and not keyworded. +media-video/avidemux aften + +# app-misc/tomboy is missing ppc support +gnome-base/gnome mono + +# USE=laptop wants x86 specific packages which can't be build on ppc +sys-apps/hal laptop + +# Joseph Jezak <josejx@gentoo.org> (12 November 2008) +# Mask the JIT for pearpc, it's x86 only +app-emulation/pearpc jit diff --git a/hardened/ppc/packages b/hardened/ppc/packages new file mode 100644 index 00000000..19cc5b31 --- /dev/null +++ b/hardened/ppc/packages @@ -0,0 +1,6 @@ +# Copyright 2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc/packages,v 1.1 2005/01/06 21:32:00 solar Exp $ + +*sys-fs/hfsutils +*sys-fs/hfsplusutils diff --git a/hardened/ppc/parent b/hardened/ppc/parent new file mode 100644 index 00000000..f3229c5b --- /dev/null +++ b/hardened/ppc/parent @@ -0,0 +1 @@ +.. diff --git a/hardened/ppc/use.mask b/hardened/ppc/use.mask new file mode 100644 index 00000000..3550b042 --- /dev/null +++ b/hardened/ppc/use.mask @@ -0,0 +1,104 @@ +# Dell does not ship or sell PPC systems +dell + +mmx +3dfx +acpi +afs +avi +cg +cmucl +dmi +fmod +fusion +hdf +i8x0 +interbase +ip28 +lm_sensors +mbrola +nvtv +rar +uml +video_cards_apm +video_cards_ark +video_cards_ast +video_cards_cyrix +video_cards_i128 +video_cards_i740 +video_cards_intel +video_cards_neomagic +video_cards_nsc +video_cards_rendition +video_cards_siliconmotion +video_cards_tga +video_cards_tseng +video_cards_vesa +video_cards_via +xvmc +-altivec +-pbbuttonsd +-ppcsha1 +-x264 + +# Modular X: unmask for architectures on which they are available +-input_devices_synaptics +-input_devices_wacom + +graphlcd +lcd_devices_graphlcd + +# Masked p2p for bug #155302 <josejx@gentoo.org> +p2p + +# cardoe@gentoo.org +# masking on ppc since the associated driver is not stable +# newer versions have possible endian issues +ivtv + +# Diego Pettenò <flameeyes@gentoo.org> (6 Dec 2006) +# Unmask the Apple drivers +-alsa_cards_aoa +-alsa_cards_aoa-fabric-layout +-alsa_cards_aoa-onyx +-alsa_cards_aoa-soundbus +-alsa_cards_aoa-soundbus-i2s +-alsa_cards_aoa-tas +-alsa_cards_aoa-toonie +-alsa_cards_powermac +# Mask ALSA drivers for ISA cards +alsa_cards_cs4232 +alsa_cards_msnd-pinnacle +alsa_cards_cs4231-lib +alsa_cards_adlib +alsa_cards_ad1816a +alsa_cards_ad1848 +alsa_cards_als100 +alsa_cards_azt2320 +alsa_cards_cmi8330 +alsa_cards_cs4231 +alsa_cards_cs4236 +alsa_cards_dt019x +alsa_cards_es968 +alsa_cards_es1688 +alsa_cards_es18xx +alsa_cards_gusclassic +alsa_cards_gusextreme +alsa_cards_gusmax +alsa_cards_interwave +alsa_cards_interwave-stb +alsa_cards_opl3sa2 +alsa_cards_opti92x-ad1848 +alsa_cards_opti92x-cs4231 +alsa_cards_opti93x +alsa_cards_miro +alsa_cards_sb8 +alsa_cards_sb16 +alsa_cards_sbawe +alsa_cards_sb16_csp +alsa_cards_sgalaxy +alsa_cards_sscape +alsa_cards_wavefront + +# net-libs/libssh2 currently missing keywords (dragonheart 20080402) +libssh2 diff --git a/hardened/ppc/virtuals b/hardened/ppc/virtuals new file mode 100644 index 00000000..cb642e9c --- /dev/null +++ b/hardened/ppc/virtuals @@ -0,0 +1,5 @@ +# Copyright 2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc/virtuals,v 1.5 2007/01/10 11:13:40 phreak Exp $ + +virtual/bootloader sys-boot/yaboot diff --git a/hardened/ppc64/README b/hardened/ppc64/README new file mode 100644 index 00000000..75da7811 --- /dev/null +++ b/hardened/ppc64/README @@ -0,0 +1,2 @@ +This profile is in testing only and results may very. +Please send feedback and patches to solar. diff --git a/hardened/ppc64/deprecated b/hardened/ppc64/deprecated new file mode 100644 index 00000000..9f45ffd5 --- /dev/null +++ b/hardened/ppc64/deprecated @@ -0,0 +1,7 @@ +hardened/linux/powerpc/ppc64/10.0/64bit-userland +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/powerpc/ppc64/10.0/64bit-userland profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/ppc64/make.defaults b/hardened/ppc64/make.defaults new file mode 100644 index 00000000..56404a1b --- /dev/null +++ b/hardened/ppc64/make.defaults @@ -0,0 +1,13 @@ +# Copyright 2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc64/make.defaults,v 1.9 2009/07/09 00:47:50 gengor Exp $ + +ARCH="ppc64" +ACCEPT_KEYWORDS="${ARCH}" +USE="${ARCH} berkdb crypt hardened pam pic readline ssl zlib" + +# ppc64 +CHOST="powerpc64-unknown-linux-gnu" +CFLAGS="-O2 -pipe" +CXXFLAGS="${CFLAGS}" +FEATURES="-sandbox" diff --git a/hardened/ppc64/package.mask b/hardened/ppc64/package.mask new file mode 100644 index 00000000..beed63c8 --- /dev/null +++ b/hardened/ppc64/package.mask @@ -0,0 +1,8 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc64/package.mask,v 1.11 2009/07/31 07:47:18 ssuominen Exp $ + +# needs newer masked gcc +=sys-libs/glibc-2.5* +=sys-libs/glibc-2.6* +=sys-libs/glibc-2.7* diff --git a/hardened/ppc64/package.use.mask b/hardened/ppc64/package.use.mask new file mode 100644 index 00000000..8a67b9ec --- /dev/null +++ b/hardened/ppc64/package.use.mask @@ -0,0 +1,30 @@ +# Joseph Jezak <josejx@gentoo.org> (Mar 20 2009) +# Mask Ruby -> Oracle bindings +dev-ruby/ruby-dbi oracle + +# Brent Baude <ranger@gentoo.org> (September 17 2008) +# # Masking clisp use from swig +dev-lang/swig clisp + +# Jean-Noël Rivasseau <elvanor@gentoo.org> (01 Aug 2008) +# Disabling gcj flag, no gcc-4.3.1 yet +dev-java/eclipse-ecj gcj + +# Diego Pettenò <flameeyes@gentoo.org> (10 Nov 2007) +# Tests for Linux-PAM 0.99 require >=sys-libs/glibc-2.4 +>=sys-libs/pam-0.99.8 test +#Brent Baude <ranger@gentoo.org> (1 Feb 2008) +# Masking hb and hb2 USE flags as no suitable solution for evms exists +sys-fs/evms hb hb2 + +# Mart Raudsepp <leio@gentoo.org> (02 Apr 2008) +# media-plugins/gst-plugins-mythtv not keyworded +media-plugins/gst-plugins-meta mythtv + +# Brent Baude <ranger@gentoo.org> (11 June 2008) +# Masking out passwdqc from pambase since passwdqc +sys-auth/pambase passwdqc + +# Daniel Gryniewicz <dang@gentoo.org> (25 Jul 2008) +# Mask unkeyworded webkit from liferea +net-news/liferea webkit diff --git a/hardened/ppc64/packages b/hardened/ppc64/packages new file mode 100644 index 00000000..1cadcaa5 --- /dev/null +++ b/hardened/ppc64/packages @@ -0,0 +1,7 @@ +# Copyright 2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc64/packages,v 1.2 2005/11/05 03:44:22 dostrow Exp $ + +*>=sys-devel/binutils-2.15 +*>=sys-devel/gcc-3.4.0-r6 +*>=sys-libs/glibc-2.3.3_pre20040529 diff --git a/hardened/ppc64/parent b/hardened/ppc64/parent new file mode 100644 index 00000000..f3229c5b --- /dev/null +++ b/hardened/ppc64/parent @@ -0,0 +1 @@ +.. diff --git a/hardened/ppc64/use.mask b/hardened/ppc64/use.mask new file mode 100644 index 00000000..f6439556 --- /dev/null +++ b/hardened/ppc64/use.mask @@ -0,0 +1,166 @@ +# this is a list of USE flags +# that should not be used on PPC64 +# Tom Gall <tgall@gentoo.org> manages this list + +# Brent Baude <ranger@gentoo.org> (3 Oct 2008) +# Masking xindy use flag for ppc64 +xindy + +# +# 01 Oct 2008 Brent Baude <ranger@gentoo.org> +# Masking battery USE for bug 238770 +battery + +# 02 Apr 2008 Mart Raudsepp <leio@gentoo.org> +# net-misc/networkmanager not keyworded +networkmanager + +# 25 Feb 2008 Brent Baude <ranger@gentoo.org> +# Masking xmlrpc use flag because xmlrpc-c does not compile +# bug 209138 +xmlrpc + + + +acpi +3dfx +directfb +avi +krb4 +lm_sensors +mplayer +pcmcia +pda +prelude +ruby +mzscheme +chasen +mono +beagle +rar +nvtv + +# should be ok +jikes +junit + +guile + +# dietlibc +diet + +#pyste has untested/unkeyworded deps on ppc64 +pyste + +# Unmask our instruction sets +-altivec + +# need to test libaio +aio +# needs some asm written +ocaml +# needs some research as to why it segfaults on build +pike + +# we don't have hardware to test. also see bug #113398 +dvb + +# until media-libs/portaudio is keyworded for ppc64 +portaudio + +# mask mozilla/firefox (bug #108020) +mozilla +firefox +seamonkey + +# 2006/03/20 - Donnie Berkholz <dberkholz@gentoo.org> +# Modular X: mask for architectures on which they aren't available +video_cards_apm +video_cards_ark +video_cards_ast +video_cards_chips +video_cards_cirrus +video_cards_cyrix +video_cards_glint +video_cards_i128 +video_cards_i740 +video_cards_imstt +video_cards_intel +video_cards_neomagic +video_cards_newport +video_cards_nsc +video_cards_rendition +video_cards_s3 +video_cards_s3virge +video_cards_savage +video_cards_siliconmotion +video_cards_sis +video_cards_tdfx +video_cards_tga +video_cards_trident +video_cards_tseng +video_cards_vesa +video_cards_vga +video_cards_via +video_cards_voodoo + +#until netbeans is keyworded +netbeans + +cg +dmi +interbase +mbrola +multilib + +# 20 Sep 2006 Doug Goldstein <cardoe@gentoo.org> +# Someone tagged MythTV as ~ppc64 but media-tv/ivtv does not +# work on ppc64 so I'm masking it's USE flag. +ivtv + +#2006/10/11 - corsair - bug #150925 +graphlcd +lcd_devices_graphlcd + + +# conky dependencies missing keywords related (dragonheart -20061112) +# media-sound/mpd +mpd +# app-admin/hddtemp +hddtemp + +# Masked p2p for bug #155302 <josejx@gentoo.org> +p2p + +# 02 Dec 2006; Tony Vroon <chainsaw@gentoo.org> +# Keywording wpa_supplicant, but I don't have madwifi(-ng) hardware to test with, only BCM4306. +madwifi + +# Diego Pettenò <flameeyes@gentoo.org> (6 Dec 2006) +# Mask ALSA drivers depending on PNP functions (not available on PPC) +alsa_cards_interwave +alsa_cards_interwave-stb +# Unmask the Apple drivers +-alsa_cards_aoa +-alsa_cards_aoa-fabric-layout +-alsa_cards_aoa-onyx +-alsa_cards_aoa-soundbus +-alsa_cards_aoa-soundbus-i2s +-alsa_cards_aoa-tas +-alsa_cards_aoa-toonie +-alsa_cards_powermac + +# mask qt4 (does not work) - bug #178779 +qt4 + +# USE=audit masked prior to testing on alpha, arm, hppa, ppc64, s390, sh. +# Bug #184563, 18 Sep 2007 +# Robin H. Johnson <robbat2@gentoo.org> +audit + +# net-libs/libssh2 currently missing keywords (dragonheart 20080402) +libssh2 + +# sys-apps/hal is using these (corsair 20081026) +dell +laptop diff --git a/hardened/ppc64/virtuals b/hardened/ppc64/virtuals new file mode 100644 index 00000000..03751a34 --- /dev/null +++ b/hardened/ppc64/virtuals @@ -0,0 +1,5 @@ +# Copyright 2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/ppc64/virtuals,v 1.6 2007/12/26 21:35:45 phreak Exp $ + +virtual/bootloader sys-boot/yaboot-static diff --git a/hardened/use.mask b/hardened/use.mask new file mode 100644 index 00000000..32ea2834 --- /dev/null +++ b/hardened/use.mask @@ -0,0 +1,23 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/use.mask,v 1.24 2009/08/05 15:22:54 gengor Exp $ + +-hardened + +emul-linux-x86 + +# supported only by gcc-4, unmask when it's stable wrt #217927 +raw + +# nvidia-drivers are masked, this has to be too +video_cards_nvidia +nvidia +vdpau + +x264 + +# tcc is x86-only +tcc + +# precompiled headers are not compat with ASLR. +pch diff --git a/hardened/virtuals b/hardened/virtuals new file mode 100644 index 00000000..c8815a25 --- /dev/null +++ b/hardened/virtuals @@ -0,0 +1,9 @@ +# Copyright 1999-2005 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/virtuals,v 1.19 2007/12/26 21:33:58 phreak Exp $ + +virtual/alsa sys-kernel/hardened-sources +virtual/bootloader sys-boot/grub +virtual/dev-manager sys-fs/udev +virtual/linux-sources sys-kernel/hardened-sources +virtual/os-headers sys-kernel/linux-headers diff --git a/hardened/x86/2.6/deprecated b/hardened/x86/2.6/deprecated new file mode 100644 index 00000000..6920ba0c --- /dev/null +++ b/hardened/x86/2.6/deprecated @@ -0,0 +1,7 @@ +hardened/linux/x86/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/x86/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/x86/2.6/profile.bashrc b/hardened/x86/2.6/profile.bashrc new file mode 100644 index 00000000..e2dff224 --- /dev/null +++ b/hardened/x86/2.6/profile.bashrc @@ -0,0 +1,12 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/x86/2.6/profile.bashrc,v 1.1 2009/03/24 17:29:22 gengor Exp $ + +if [[ "${EBUILD_PHASE}" == "setup" ]] +then + echo + ewarn "The hardened/x86/2.6 profile is deprecated. This profile has been" + ewarn "pushed down to hardened/x86. Please update your /etc/make.profile" + ewarn "symlink to use the hardened/x86 profile. See: eselect profile list" + echo +fi diff --git a/hardened/x86/deprecated b/hardened/x86/deprecated new file mode 100644 index 00000000..6920ba0c --- /dev/null +++ b/hardened/x86/deprecated @@ -0,0 +1,7 @@ +hardened/linux/x86/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/x86/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/x86/make.defaults b/hardened/x86/make.defaults new file mode 100644 index 00000000..ae5fc59d --- /dev/null +++ b/hardened/x86/make.defaults @@ -0,0 +1,26 @@ +# Copyright 1999-2006 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/x86/make.defaults,v 1.19 2009/08/16 22:09:15 remi Exp $ + +ARCH="x86" +ACCEPT_KEYWORDS="x86" + +CHOST="i486-pc-linux-gnu" +CFLAGS="-mcpu=i486 -O2 -pipe" +CXXFLAGS="${CFLAGS}" + +USE="berkdb crypt hardened nls nptl nptlonly pam pic readline ssl tcpd zlib" + +# 2006/08/18 - Donnie Berkholz <dberkholz@gentoo.org> +# Defaults for video drivers +VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 imstt intel \ + mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage \ + siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware \ + voodoo" + +# 2006/12/21 - Andrej Kacian <ticho@gentoo.org> +# Defaults for audio drivers +ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 \ + emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m \ + maestro3 trident usb-audio via82xx via82xx-modem ymfpci" +PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/hardened/x86/" diff --git a/hardened/x86/minimal/deprecated b/hardened/x86/minimal/deprecated new file mode 100644 index 00000000..6920ba0c --- /dev/null +++ b/hardened/x86/minimal/deprecated @@ -0,0 +1,7 @@ +hardened/linux/x86/10.0 +# Check 'eselect profile list'. +# Find the number that corresponds with the hardened/linux/x86/10.0 profile. +# Use 'eselect profile set <number>' to set a new /etc/make.profile symlink. +# +# Reference: http://www.gentoo.org/doc/en/gentoo-upgrading.xml +# See: "General instructions" in Section 3. "Profile updating instructions" diff --git a/hardened/x86/minimal/make.defaults b/hardened/x86/minimal/make.defaults new file mode 100644 index 00000000..9a0ed8f4 --- /dev/null +++ b/hardened/x86/minimal/make.defaults @@ -0,0 +1,17 @@ +# Copyright 2007 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/x86/minimal/make.defaults,v 1.1 2009/03/24 17:29:22 gengor Exp $ + +# - TESTING PROFILE - TESTING PROFILE - +# ------ USE AT YOUR OWN RISK ------ + +ARCH="x86" +ACCEPT_KEYWORDS="${ARCH}" +USE="-* ${ARCH} crypt hardened minimal multicall ncurses pic readline zlib" +PORTDIR=/usr/portage/ +PKGDIR=${PORTDIR}/packages/${ARCH}/ + +CFLAGS="-Os -pipe" +CXXFLAGS="${CFLAGS}" +FEATURES="sandbox sfperms strict nodoc noinfo noman autoconfig" + diff --git a/hardened/x86/minimal/parent b/hardened/x86/minimal/parent new file mode 100644 index 00000000..f3229c5b --- /dev/null +++ b/hardened/x86/minimal/parent @@ -0,0 +1 @@ +.. diff --git a/hardened/x86/minimal/use.mask b/hardened/x86/minimal/use.mask new file mode 100644 index 00000000..6645969e --- /dev/null +++ b/hardened/x86/minimal/use.mask @@ -0,0 +1,2 @@ +pam +nls diff --git a/hardened/x86/minimal/virtuals b/hardened/x86/minimal/virtuals new file mode 100644 index 00000000..590fb849 --- /dev/null +++ b/hardened/x86/minimal/virtuals @@ -0,0 +1 @@ +virtual/ssh net-misc/dropbear diff --git a/hardened/x86/package.mask b/hardened/x86/package.mask new file mode 100644 index 00000000..5944c938 --- /dev/null +++ b/hardened/x86/package.mask @@ -0,0 +1,9 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/x86/package.mask,v 1.54 2009/09/11 17:48:07 gengor Exp $ + +<sys-kernel/linux-headers-2.5 + +# Christian Faulhammer <opfer@gentoo.org> (05 Dec 2006) +# this version is badly broken on x86, see bug #153280 +~app-arch/rpm-4.4.7 diff --git a/hardened/x86/package.use b/hardened/x86/package.use new file mode 100644 index 00000000..9a3642cd --- /dev/null +++ b/hardened/x86/package.use @@ -0,0 +1,4 @@ +# This file requires >=portage-2.1.2 (see bug #61732) + +# cyrus-sasl doesn't work w/ USE=berkdb (#192753) +dev-libs/cyrus-sasl gdbm diff --git a/hardened/x86/package.use.mask b/hardened/x86/package.use.mask new file mode 100644 index 00000000..aa35bf56 --- /dev/null +++ b/hardened/x86/package.use.mask @@ -0,0 +1,26 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/x86/package.use.mask,v 1.11 2009/08/05 15:02:47 gengor Exp $ + +# 26 Mar 2009: Gordon Malm <gengor@gentoo.org> +# This version fails if <gcc-4.2, subsequent versions do not +=x11-libs/pixman-0.12.0 sse2 + +# Raúl Porcel <armin76@gentoo.org> (02 Dec 2008) +media-libs/realcodecs win32codecs + +# Jean-Noël Rivasseau <elvanor@gentoo.org> (01 Aug 2008) +# Disabling gcj flag, no gcc-4.3.1 yet +dev-java/eclipse-ecj gcj + +# cyrus-sasl doesn't work w/ USE=berkdb (#192753) +dev-libs/cyrus-sasl berkdb + +# bug #147908 - unmask these on x86 profiles +>=dev-java/sun-jdk-1.5 -nsplugin +>=dev-java/sun-jre-bin-1.5 -nsplugin +>=dev-java/ibm-jdk-bin-1.5 -nsplugin +>=dev-java/ibm-jre-bin-1.5 -nsplugin + +# missing the necessary linux-headers dep +>=net-fs/netatalk-2.0.3-r3 xfs diff --git a/hardened/x86/packages b/hardened/x86/packages new file mode 100644 index 00000000..c3d77e4e --- /dev/null +++ b/hardened/x86/packages @@ -0,0 +1,10 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/x86/packages,v 1.16 2009/07/14 08:39:00 gengor Exp $ + +*>=sys-devel/binutils-2.13.90.0.4 + +>=x11-base/xorg-x11-6.8.0-r4 + +*sys-devel/libtool +*virtual/dev-manager diff --git a/hardened/x86/parent b/hardened/x86/parent new file mode 100644 index 00000000..f3229c5b --- /dev/null +++ b/hardened/x86/parent @@ -0,0 +1 @@ +.. diff --git a/hardened/x86/use.mask b/hardened/x86/use.mask new file mode 100644 index 00000000..1c378b95 --- /dev/null +++ b/hardened/x86/use.mask @@ -0,0 +1,56 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/x86/use.mask,v 1.33 2009/07/06 00:02:57 gengor Exp $ + +# SIMD +-3dnow +-3dnowext +-mmx +-mmxext +-sse +-sse2 +-sse3 +-ssse3 + +# arch/other +-kqemu +-nvram +-svga + +# Copied from default-linux/x86 2006-04-02; bug #128490 +# Modular X: unmask for architectures on which they are available +-input_devices_synaptics +-input_devices_vmmouse +-input_devices_wacom +-video_cards_fglrx +-video_cards_vmware + +# Modular X: mask for architectures on which they aren't available +video_cards_newport + +# codec support +-win32codecs +-x264 + +# Diego Petteno <flameeyes@gentoo.org> (4 Jan 2007) +# Unmask the flags for PHP that are available only on x86 +-fdftk +-sybase-ct +-ingres +-birdstep +-adabas +-filepro +-pfpro +-informix +-empress +-empress-bcs +-sybase +-frontbase +-dbmaker +-esoob +-solid +# Shared with amd64 +-oci8 +-oracle7 +-firebird +-db2 diff --git a/hardened/x86/virtuals b/hardened/x86/virtuals new file mode 100644 index 00000000..a9794db7 --- /dev/null +++ b/hardened/x86/virtuals @@ -0,0 +1,4 @@ +# Copyright 1999-2006 Gentoo Foundation. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/profiles/hardened/x86/virtuals,v 1.13 2009/03/24 17:26:37 gengor Exp $ + diff --git a/media-libs/xine-lib/ChangeLog b/media-libs/xine-lib/ChangeLog deleted file mode 100644 index ab0dcfda..00000000 --- a/media-libs/xine-lib/ChangeLog +++ /dev/null @@ -1,11 +0,0 @@ -# ChangeLog for media-libs/xine-lib -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*xine-lib-1.1.16.3-r2 (29 Aug 2009) - - 29 Aug 2009; Magnus Granberg <zorry@ume.nu> - +files/xine-lib-1.1.15-pic-fix.patch, +xine-lib-1.1.16.3-r2.ebuild, - +files/xine-lib-1.1.16.3-libmpcdecsv7.patch, +metadata.xml: - Fix bug #164425 Thanks PaX Team - diff --git a/media-libs/xine-lib/Manifest b/media-libs/xine-lib/Manifest deleted file mode 100644 index 82bff20e..00000000 --- a/media-libs/xine-lib/Manifest +++ /dev/null @@ -1,6 +0,0 @@ -AUX xine-lib-1.1.15-pic-fix.patch 31285 RMD160 c14dfecc382060bd03537848e4190c0f031efcdf SHA1 9ccea43eba1397e5c65909f0ecc808fe7061e8a1 SHA256 92d67efccd0d0e9c26f349ea0007fa22a5bcf738e8929070787e92686cb858bb -AUX xine-lib-1.1.16.3-libmpcdecsv7.patch 1798 RMD160 57ea11ed7ab5d345b588017ff38fde8cd4e2db59 SHA1 0f62d6d60809c641ae8147774225c113620f8a19 SHA256 111ecc67d11cb0847b2bf7ded7db776a08651ee5171d92da6a30f10430a3623b -DIST xine-lib-1.1.16.3.tar.bz2 7468182 RMD160 279304a4e998472b2b5e79887e54c47765044ec6 SHA1 64c57c5f55ff37023cc4c3d93d4df3c06950d235 SHA256 d25a241efa55dc7d8f482336efa8bb7b9bb9d69b6df8a8a37f2660948fd67b52 -EBUILD xine-lib-1.1.16.3-r2.ebuild 5676 RMD160 7cbe0d98989b9baca80cbcb6d32bb24cf9da4586 SHA1 d186cb33de25fcbedffc867e1b5e2108c45a6d25 SHA256 a2f9ab50f439c0b6e6d51d925ca120b4f8079a9c1d51a32c135329518830cb0e -MISC ChangeLog 370 RMD160 f22d25a7933a6df6565a367c3ef1b074888dade6 SHA1 297a6efe447edfdaa34276ef1a93d9644dfeaeed SHA256 fefc012ceffd6b7a7c0f510d09e70529bf978169727f991a514e14b9ee38842c -MISC metadata.xml 2914 RMD160 bed4bab81a32b49e4923ddfcc02e8338a45ef7ef SHA1 fe3faf7dba7f929241acfe5eaa17b2f66bfb2722 SHA256 efe3b879c59c9971e1ffcd732c2bdbd8f60f2b173fde675a371202ceeb96b0fe diff --git a/media-libs/xine-lib/files/xine-lib-1.1.15-pic-fix.patch b/media-libs/xine-lib/files/xine-lib-1.1.15-pic-fix.patch deleted file mode 100644 index 71e1bf41..00000000 --- a/media-libs/xine-lib/files/xine-lib-1.1.15-pic-fix.patch +++ /dev/null @@ -1,657 +0,0 @@ -2008-09-20 PaX Team <pageexec@freemail.hu> - - #164425 bugs.gentoo.org - * /usr/lib/xine/plugins/1.24/post/xineplug_post_tvtime.so Fix TEXTREL - -diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc ---- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc 2008-04-17 18:53:59.000000000 +0200 -+++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoop0A.inc 2008-09-20 12:04:56.000000000 +0200 -@@ -7,9 +7,9 @@ - // up by a little, and adjust later - - #ifdef IS_SSE2 -- "paddusb "MANGLE(ONES)", %%xmm7\n\t" // bias toward no motion -+ "paddusb "_ONES", %%xmm7\n\t" // bias toward no motion - #else -- "paddusb "MANGLE(ONES)", %%mm7\n\t" // bias toward no motion -+ "paddusb "_ONES", %%mm7\n\t" // bias toward no motion - #endif - - MERGE4PIXavg("(%%"XDI", %%"XCX")", "(%%"XSI", %%"XCX")") // center, in old and new -diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc ---- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc 2008-04-17 18:53:59.000000000 +0200 -+++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoopBottom.inc 2008-09-20 12:04:56.000000000 +0200 -@@ -18,7 +18,7 @@ - // Use the best weave if diffs less than 10 as that - // means the image is still or moving cleanly - // if there is motion we will clip which will catch anything -- "psubusb "MANGLE(FOURS)", %%mm7\n\t" // sets bits to zero if weave diff < 4 -+ "psubusb "_FOURS", %%mm7\n\t" // sets bits to zero if weave diff < 4 - "pxor %%mm0, %%mm0\n\t" - "pcmpeqb %%mm0, %%mm7\n\t" // all ff where weave better, else 00 - "pcmpeqb %%mm7, %%mm0\n\t" // all ff where bob better, else 00 -@@ -28,10 +28,10 @@ - #else - // Use the better of bob or weave - // pminub mm4, TENS // the most we care about -- V_PMINUB ("%%mm4", MANGLE(TENS), "%%mm0") // the most we care about -+ V_PMINUB ("%%mm4", _TENS, "%%mm0") // the most we care about - - "psubusb %%mm4, %%mm7\n\t" // foregive that much from weave est? -- "psubusb "MANGLE(FOURS)", %%mm7\n\t" // bias it a bit toward weave -+ "psubusb "_FOURS", %%mm7\n\t" // bias it a bit toward weave - "pxor %%mm0, %%mm0\n\t" - "pcmpeqb %%mm0, %%mm7\n\t" // all ff where weave better, else 00 - "pcmpeqb %%mm7, %%mm0\n\t" // all ff where bob better, else 00 -@@ -42,39 +42,39 @@ - - - // pminub mm0, Max_Vals // but clip to catch the stray error --// V_PMINUB ("%%mm0", MANGLE(Max_Vals), "%%mm1") // but clip to catch the stray error -+// V_PMINUB ("%%mm0", _Max_Vals, "%%mm1") // but clip to catch the stray error - // pmaxub mm0, Min_Vals --// V_PMAXUB ("%%mm0", MANGLE(Min_Vals)) -+// V_PMAXUB ("%%mm0", _Min_Vals) - - #endif - - - MOVX" "_pDest", %%"XAX"\n\t" -- -+ ADDX" "_olddx", %%"XAX"\n\t" -+ - #ifdef USE_VERTICAL_FILTER - "movq %%mm0, %%mm1\n\t" -- // pavgb mm0, qword ptr["XBX"] -- V_PAVGB ("%%mm0", "(%%"XBX")", "%%mm2", MANGLE(ShiftMask)) -- // movntq qword ptr["XAX"+"XDX"], mm0 -- V_MOVNTQ ("(%"XAX", %%"XDX")", "%%mm0") -- // pavgb mm1, qword ptr["XBX"+"XCX"] -- V_PAVGB ("%%mm1", "(%%"XBX", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) -- "addq "_dst_pitchw", %%"XBX -- // movntq qword ptr["XAX"+"XDX"], mm1 -- V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm1") -+ // pavgb mm0, qword ptr["XDX"] -+ V_PAVGB ("%%mm0", "(%%"XDX")", "%%mm2", _ShiftMask) -+ // movntq qword ptr["XAX"+"_olddx"], mm0 -+ V_MOVNTQ ("(%"XAX")", "%%mm0") -+ // pavgb mm1, qword ptr["XDX"+"XCX"] -+ V_PAVGB ("%%mm1", "(%%"XDX", %%"XCX")", "%%mm2", _ShiftMask) -+ "addq "_dst_pitchw", %%"XDX -+ // movntq qword ptr["XAX"+"_olddx"], mm1 -+ V_MOVNTQ ("(%%"XAX")", "%%mm1") - #else - -- // movntq qword ptr["XAX"+"XDX"], mm0 -- V_MOVNTQ ("(%%"XAX", %%"XDX")", "%%mm0") -+ // movntq qword ptr["XAX"+"_olddx"], mm0 -+ V_MOVNTQ ("(%%"XAX")", "%%mm0") - #endif - -- LEAX" 8(%%"XDX"), %%"XDX"\n\t" // bump offset pointer -- CMPX" "_Last8", %%"XDX"\n\t" // done with line? -+ ADDX" $8, "_olddx"\n\t" // bump offset pointer -+ MOVX" "_olddx", %%"XAX"\n\t" -+ CMPX" "_Last8", %%"XAX"\n\t" // done with line? - "jb 1b\n\t" // y - #endif - -- MOVX" "_oldbx", %%"XBX"\n\t" -- - : /* no outputs */ - - : "m"(pBob), -@@ -85,7 +85,17 @@ - "m"(pSrc), - "m"(pSrcP), - "m"(pBobP), -- "m"(oldbx) -+ "m"(olddx), -+ "m"(UVMask), -+ "m"(ShiftMask), -+ "m"(FOURS), -+ "m"(TENS), -+ "m"(Max_Vals), -+ "m"(Min_Vals), -+ "m"(YMask), -+ "m"(Max_Mov), -+ "m"(ONES), -+ "m"(DiffThres) - - : XAX, XCX, XDX, XSI, XDI, - #ifdef ARCH_X86 -diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc ---- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc 2008-04-17 18:53:59.000000000 +0200 -+++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/SearchLoopTop.inc 2008-09-20 12:04:56.000000000 +0200 -@@ -66,7 +66,17 @@ long dst_pitchw = dst_pitch; // local s - #define _pSrc "%5" - #define _pSrcP "%6" - #define _pBobP "%7" --#define _oldbx "%8" -+#define _olddx "%8" -+#define _UVMask "%9" -+#define _ShiftMask "%10" -+#define _FOURS "%11" -+#define _TENS "%12" -+#define _Max_Vals "%13" -+#define _Min_Vals "%14" -+#define _YMask "%15" -+#define _Max_Mov "%16" -+#define _ONES "%17" -+#define _DiffThres "%18" - #endif - - for (y=1; y < FldHeight-1; y++) -@@ -77,75 +87,75 @@ long dst_pitchw = dst_pitch; // local s - // Loop general reg usage - // - // XAX - pBobP, then pDest -- // XBX - pBob -+ // XDX - pBob - // XCX - src_pitch2 -- // XDX - current offset -+ // _olddx - current offset - // XDI - prev weave pixels, 1 line up - // XSI - next weave pixels, 1 line up - -- // Save "XBX" (-fPIC) -- MOVX" %%"XBX", "_oldbx"\n\t" -- - #ifdef IS_SSE2 - - // sse2 code deleted for now - - #else - // simple bob first 8 bytes -- MOVX" "_pBob", %%"XBX"\n\t" -+ MOVX" "_pBob", %%"XDX"\n\t" - MOVX" "_src_pitch2", %%"XCX"\n\t" - - #ifdef USE_VERTICAL_FILTER -- "movq (%%"XBX"), %%mm0\n\t" -- "movq (%%"XBX", %%"XCX"), %%mm1\n\t" //, qword ptr["XBX"+"XCX"] -+ "movq (%%"XDX"), %%mm0\n\t" -+ "movq (%%"XDX", %%"XCX"), %%mm1\n\t" //, qword ptr["XDX"+"XCX"] - "movq %%mm0, %%mm2\n\t" -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // halfway between -- V_PAVGB ("%%mm0", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 1/4 way -- V_PAVGB ("%%mm1", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 3/4 way -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // halfway between -+ V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask) // 1/4 way -+ V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask) // 3/4 way - MOVX" "_pDest", %%"XDI"\n\t" - MOVX" "_dst_pitchw", %%"XAX"\n\t" - V_MOVNTQ ("(%%"XDI")", "%%mm0") - V_MOVNTQ ("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1 - - // simple bob last 8 bytes -- MOVX" "_Last8", %%"XDX"\n\t" -- LEAX" (%%"XBX", %%"XDX"), %%"XSI"\n\t" // ["XBX"+"XDX"] -+ MOVX" "_Last8", %%"XSI"\n\t" -+ MOVX" %%"XSI", "_olddx"\n\t" -+ ADDX" %%"XDX", %%"XSI"\n\t" // ["XDX"+"_olddx"] - "movq (%%"XSI"), %%mm0\n\t" - "movq (%%"XSI", %%"XCX"), %%mm1\n\t" // qword ptr["XSI"+"XCX"] - "movq %%mm0, %%mm2\n\t" -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // halfway between -- V_PAVGB ("%%mm0", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 1/4 way -- V_PAVGB ("%%mm1", "%%mm2", "%%mm3", MANGLE(ShiftMask)) // 3/4 way -- ADDX" %%"XDX", %%"XDI"\n\t" // last 8 bytes of dest -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // halfway between -+ V_PAVGB ("%%mm0", "%%mm2", "%%mm3", _ShiftMask) // 1/4 way -+ V_PAVGB ("%%mm1", "%%mm2", "%%mm3", _ShiftMask) // 3/4 way -+ ADDX" "_olddx", %%"XDI"\n\t" // last 8 bytes of dest - V_MOVNTQ ("%%"XDI"", "%%mm0") - V_MOVNTQ ("(%%"XDI", %%"XAX")", "%%mm1") // qword ptr["XDI"+"XAX"], mm1) - - #else -- "movq (%%"XBX"), %%mm0\n\t" -- // pavgb mm0, qword ptr["XBX"+"XCX"] -- V_PAVGB ("%%mm0", "(%%"XBX", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) // qword ptr["XBX"+"XCX"], mm2, ShiftMask) -+ "movq (%%"XDX"), %%mm0\n\t" -+ // pavgb mm0, qword ptr["XDX"+"XCX"] -+ V_PAVGB ("%%mm0", "(%%"XDX", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XDX"+"XCX"], mm2, ShiftMask) - MOVX" "_pDest", %%"XDI"\n\t" - V_MOVNTQ ("(%%"XDI")", "%%mm0") - - // simple bob last 8 bytes -- MOVX" "_Last8", %%"XDX"\n\t" -- LEAX" (%%"XBX", %%"XDX"), %%"XSI"\n\t" //"XSI", ["XBX"+"XDX"] -+ MOVX" "_Last8", %%"XSI"\n\t" -+ MOVX" %%"XSI", "_olddx"\n\t" -+ ADDX" %%"XDX", %%"XSI"\n\t" //"XSI", ["XDX"+"_olddx"] - "movq (%%"XSI"), %%mm0\n\t" - // pavgb mm0, qword ptr["XSI"+"XCX"] -- V_PAVGB ("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", MANGLE(ShiftMask)) // qword ptr["XSI"+"XCX"], mm2, ShiftMask) -- V_MOVNTQ ("(%%"XDI", %%"XDX")", "%%mm0") // qword ptr["XDI"+"XDX"], mm0) -+ V_PAVGB ("%%mm0", "(%%"XSI", %%"XCX")", "%%mm2", _ShiftMask) // qword ptr["XSI"+"XCX"], mm2, ShiftMask) -+ ADDX" "_olddx", %%"XDI"\n\t" -+ V_MOVNTQ ("(%%"XDI")", "%%mm0") // qword ptr["XDI"+"_olddx"], mm0) - #endif - // now loop and get the middle qwords - MOVX" "_pSrc", %%"XSI"\n\t" - MOVX" "_pSrcP", %%"XDI"\n\t" -- MOVX" $8, %%"XDX"\n\t" // curr offset longo all lines -+ MOVX" $8, "_olddx"\n\t" // curr offset longo all lines - - "1:\n\t" - MOVX" "_pBobP", %%"XAX"\n\t" - ADDX" $8, %%"XDI"\n\t" - ADDX" $8, %%"XSI"\n\t" -- ADDX" $8, %%"XBX"\n\t" -- ADDX" %%"XDX", %%"XAX"\n\t" -+ ADDX" $8, %%"XDX"\n\t" -+ ADDX" "_olddx", %%"XAX"\n\t" - - #ifdef USE_STRANGE_BOB - #include "StrangeBob.inc" -diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc ---- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc 2008-04-17 18:53:59.000000000 +0200 -+++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/StrangeBob.inc 2008-09-20 12:04:56.000000000 +0200 -@@ -31,22 +31,22 @@ - "pxor %%mm6, %%mm6\n\t" - "pxor %%mm7, %%mm7\n\t" - -- "movq -2(%%"XBX"), %%mm0\n\t" // value a from top left -- "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value m from bottom right -+ "movq -2(%%"XDX"), %%mm0\n\t" // value a from top left -+ "movq -4(%%"XDX", %%"XCX"), %%mm1\n\t" // value m from bottom right - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(a,m) - -- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(a,m) > Thres else 0 -+ "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(a,m) > Thres else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(a,m) < Thres, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(a,m) > Thres, else 00 - - -- "movq -4(%%"XBX"), %%mm0\n\t" // value j -- "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n -+ "movq -4(%%"XDX"), %%mm0\n\t" // value j -+ "movq 4(%%"XDX", %%"XCX"), %%mm1\n\t" // value n - "movq %%mm0, %%mm2\n\t" - "pavgb %%mm1, %%mm2\n\t" // avg(j,n) - "movq %%mm0, %%mm3\n\t" -@@ -55,7 +55,7 @@ - "por %%mm1, %%mm0\n\t" // abs(j,n) - - "movq %%mm0, %%mm1\n\t" -- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(j,n) > Thres else 0 -+ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(j,n) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(j,n) < Thres, else 00 - -@@ -75,31 +75,31 @@ - "por %%mm0, %%mm7\n\t" - - // k & m -- "movq 2(%%"XBX"), %%mm0\n\t" // value c from top left -- "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom right -+ "movq 2(%%"XDX"), %%mm0\n\t" // value c from top left -+ "movq 4(%%"XDX", %%"XCX"), %%mm1\n\t" // value n from bottom right - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(c,n) - -- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(c,n) > Thres else 0 -+ "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(c,n) > Thres else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(c,n) < Thres, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(c,n) > Thres, else 00 - - -- "movq 4(%%"XBX"), %%mm0\n\t" // value k -- "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value m -+ "movq 4(%%"XDX"), %%mm0\n\t" // value k -+ "movq -4(%%"XDX", %%"XCX"), %%mm1\n\t" // value m - "movq %%mm0, %%mm2\n\t" -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(k,m) -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(k,m) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(k,m) - - "movq %%mm0, %%mm1\n\t" -- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(k,m) > Thres else 0 -+ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(k,m) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(k,m) < Thres, else 00 - -@@ -120,30 +120,30 @@ - - - // c & d -- "movq (%%"XBX"), %%mm0\n\t" // value b from top left -- "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right -+ "movq (%%"XDX"), %%mm0\n\t" // value b from top left -+ "movq 2(%%"XDX", %%"XCX"), %%mm1\n\t" // value f from bottom right - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(b,f) - -- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(b,f) > Thres else 0 -+ "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(b,f) > Thres else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(b,f) < Thres, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(b,f) > Thres, else 00 - -- "movq 2(%%"XBX"), %%mm0\n\t" // value c -- "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value d -+ "movq 2(%%"XDX"), %%mm0\n\t" // value c -+ "movq -2(%%"XDX", %%"XCX"), %%mm1\n\t" // value d - "movq %%mm0, %%mm2\n\t" -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(c,d) -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(c,d) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(c,d) - - "movq %%mm0, %%mm1\n\t" -- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(c,d) > Thres else 0 -+ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(c,d) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(c,d) < Thres, else 00 - -@@ -163,30 +163,30 @@ - "por %%mm0, %%mm7\n\t" - - // a & f -- "movq (%%"XBX"), %%mm0\n\t" // value b from top left -- "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value d from bottom right -+ "movq (%%"XDX"), %%mm0\n\t" // value b from top left -+ "movq -2(%%"XDX", %%"XCX"), %%mm1\n\t" // value d from bottom right - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm3\n\t" // abs(b,d) - -- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // nonzero where abs(b,d) > Thres else 0 -+ "psubusb "_DiffThres", %%mm3\n\t" // nonzero where abs(b,d) > Thres else 0 - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where abs(b,d) < Thres, else 00 - "pcmpeqb %%mm3, %%mm4\n\t" // here ff where abs(b,d) > Thres, else 00 - -- "movq -2(%%"XBX"), %%mm0\n\t" // value a -- "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f -+ "movq -2(%%"XDX"), %%mm0\n\t" // value a -+ "movq 2(%%"XDX", %%"XCX"), %%mm1\n\t" // value f - "movq %%mm0, %%mm2\n\t" -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(a,f) -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(a,f) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(a,f) - - "movq %%mm0, %%mm1\n\t" -- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(a,f) > Thres else 0 -+ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(a,f) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(a,f) < Thres, else 00 - -@@ -205,22 +205,22 @@ - "por %%mm2, %%mm6\n\t" - "por %%mm0, %%mm7\n\t" - -- "pand "MANGLE(YMask)", %%mm5\n\t" // mask out chroma from here -- "pand "MANGLE(YMask)", %%mm6\n\t" // mask out chroma from here -- "pand "MANGLE(YMask)", %%mm7\n\t" // mask out chroma from here -+ "pand "_YMask", %%mm5\n\t" // mask out chroma from here -+ "pand "_YMask", %%mm6\n\t" // mask out chroma from here -+ "pand "_YMask", %%mm7\n\t" // mask out chroma from here - - // b,e -- "movq (%%"XBX"), %%mm0\n\t" // value b from top -- "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom -+ "movq (%%"XDX"), %%mm0\n\t" // value b from top -+ "movq (%%"XDX", %%"XCX"), %%mm1\n\t" // value e from bottom - "movq %%mm0, %%mm2\n\t" -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e) -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm0\n\t" - "psubusb %%mm3, %%mm1\n\t" - "por %%mm1, %%mm0\n\t" // abs(b,e) - - "movq %%mm0, %%mm1\n\t" -- "psubusb "MANGLE(DiffThres)", %%mm1\n\t" // nonzero where abs(b,e) > Thres else 0 -+ "psubusb "_DiffThres", %%mm1\n\t" // nonzero where abs(b,e) > Thres else 0 - "pxor %%mm3, %%mm3\n\t" - "pcmpeqb %%mm3, %%mm1\n\t" // now ff where abs(b,e) < Thres, else 00 - -@@ -238,8 +238,8 @@ - "por %%mm0, %%mm7\n\t" - - // bob in any leftovers -- "movq (%%"XBX"), %%mm0\n\t" // value b from top -- "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom -+ "movq (%%"XDX"), %%mm0\n\t" // value b from top -+ "movq (%%"XDX", %%"XCX"), %%mm1\n\t" // value e from bottom - - - // We will also calc here the max/min values to later limit comb -@@ -271,7 +271,7 @@ - "por %%mm2, %%mm3\n\t" // abs diff - // pmaxub %%mm3, %%mm4 // top or bottom pixel moved most - V_PMAXUB ("%%mm3", "%%mm4") // top or bottom pixel moved most -- "psubusb "MANGLE(DiffThres)", %%mm3\n\t" // moved more than allowed? or goes to 0? -+ "psubusb "_DiffThres", %%mm3\n\t" // moved more than allowed? or goes to 0? - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where low motion, else high motion - -@@ -283,19 +283,19 @@ - V_PMAXUB ("%%mm6", "%%mm2") - - "psubusb %%mm3, %%mm2\n\t" // maybe decrease it to 0000.. if no surround motion --// "movq %%mm2, "MANGLE(Min_Vals)"\n\t" -+// "movq %%mm2, "_Min_Vals"\n\t" - - "movq %%mm0, %%mm2\n\t" - V_PMAXUB ("%%mm2", "%%mm1") - // pminub %%mm6, %%mm2 // clip our current results so far to be below this - V_PMINUB ("%%mm6", "%%mm2", "%%mm4") - "paddusb %%mm3, %%mm2\n\t" // maybe increase it to ffffff if no surround motion --// "movq %%mm2, "MANGLE(Max_Vals)"\n\t" -+// "movq %%mm2, "_Max_Vals"\n\t" - #endif - - "movq %%mm0, %%mm2\n\t" - // pavgb %%mm2, %%mm1 // avg(b,e) -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e) -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e) - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" -diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc ---- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc 2008-04-17 18:53:59.000000000 +0200 -+++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/TomsMoCompAll.inc 2008-09-20 12:04:56.000000000 +0200 -@@ -33,8 +33,8 @@ static const int64_t __attribute__((__us - static const int64_t __attribute__((__used__)) FOURS = 0x0404040404040404ull; - static const int64_t __attribute__((__used__)) ONES = 0x0101010101010101ull; - static const int64_t __attribute__((__used__)) ShiftMask = 0xfefffefffefffeffull; --//static int64_t Min_Vals = 0x0000000000000000ull; --//static int64_t Max_Vals = 0x0000000000000000ull; -+static int64_t Min_Vals = 0x0000000000000000ull; -+static int64_t Max_Vals = 0x0000000000000000ull; - #endif - - #ifndef TopFirst -@@ -69,7 +69,7 @@ static void FUNCT_NAME(uint8_t *output, - int rowsize; - int FldHeight; - int stride = (width*2); -- long oldbx; -+ long olddx; - - - src_pitch = stride*2; -diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc ---- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc 2008-04-17 18:53:59.000000000 +0200 -+++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/WierdBob.inc 2008-09-20 12:04:56.000000000 +0200 -@@ -14,22 +14,22 @@ - // selected for the smallest of abs(a,f), abs(c,d), or abs(b,e), etc. - - // a,f -- "movq -2(%%"XBX"), %%mm0\n\t" // value a from top left -- "movq 2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right -+ "movq -2(%%"XDX"), %%mm0\n\t" // value a from top left -+ "movq 2(%%"XDX", %%"XCX"), %%mm1\n\t" // value f from bottom right - "movq %%mm0, %%mm6\n\t" - // pavgb %%mm6, %%mm1 // avg(a,f), also best so far -- V_PAVGB ("%%mm6", "%%mm1", "%%mm7", MANGLE(ShiftMask)) // avg(a,f), also best so far -+ V_PAVGB ("%%mm6", "%%mm1", "%%mm7", _ShiftMask) // avg(a,f), also best so far - "movq %%mm0, %%mm7\n\t" - "psubusb %%mm1, %%mm7\n\t" - "psubusb %%mm0, %%mm1\n\t" - "por %%mm1, %%mm7\n\t" // abs diff, also best so far - - // c,d -- "movq 2(%%"XBX"), %%mm0\n\t" // value a from top left -- "movq -2(%%"XBX", %%"XCX"), %%mm1\n\t" // value f from bottom right -+ "movq 2(%%"XDX"), %%mm0\n\t" // value a from top left -+ "movq -2(%%"XDX", %%"XCX"), %%mm1\n\t" // value f from bottom right - "movq %%mm0, %%mm2\n\t" - // pavgb %%mm2, %%mm1 // avg(c,d) -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(c,d) -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(c,d) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" -@@ -49,15 +49,15 @@ - - "por %%mm2, %%mm6\n\t" // and merge new & old vals keeping best - "por %%mm1, %%mm7\n\t" -- "por "MANGLE(UVMask)", %%mm7\n\t" // but we know chroma is worthless so far -- "pand "MANGLE(YMask)", %%mm5\n\t" // mask out chroma from here also -+ "por "_UVMask", %%mm7\n\t" // but we know chroma is worthless so far -+ "pand "_YMask", %%mm5\n\t" // mask out chroma from here also - - // j,n -- "movq -4(%%"XBX"), %%mm0\n\t" // value j from top left -- "movq 4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom right -+ "movq -4(%%"XDX"), %%mm0\n\t" // value j from top left -+ "movq 4(%%"XDX", %%"XCX"), %%mm1\n\t" // value n from bottom right - "movq %%mm0, %%mm2\n\t" - // pavgb %%mm2, %%mm1 // avg(j,n) -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(j,n) -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(j,n) - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" - "psubusb %%mm0, %%mm1\n\t" -@@ -79,11 +79,11 @@ - "por %%mm1, %%mm7\n\t" // " - - // k, m -- "movq 4(%%"XBX"), %%mm0\n\t" // value k from top right -- "movq -4(%%"XBX", %%"XCX"), %%mm1\n\t" // value n from bottom left -+ "movq 4(%%"XDX"), %%mm0\n\t" // value k from top right -+ "movq -4(%%"XDX", %%"XCX"), %%mm1\n\t" // value n from bottom left - "movq %%mm0, %%mm4\n\t" - // pavgb %%mm4, %%mm1 // avg(k,m) -- V_PAVGB ("%%mm4", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(k,m) -+ V_PAVGB ("%%mm4", "%%mm1", "%%mm3", _ShiftMask) // avg(k,m) - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" -@@ -108,8 +108,8 @@ - "por %%mm1, %%mm7\n\t" // " - - // b,e -- "movq (%%"XBX"), %%mm0\n\t" // value b from top -- "movq (%%"XBX", %%"XCX"), %%mm1\n\t" // value e from bottom -+ "movq (%%"XDX"), %%mm0\n\t" // value b from top -+ "movq (%%"XDX", %%"XCX"), %%mm1\n\t" // value e from bottom - - // We will also calc here the max/min values to later limit comb - // so the max excursion will not exceed the Max_Comb constant -@@ -140,7 +140,7 @@ - "por %%mm2, %%mm3\n\t" // abs diff - // pmaxub %%mm3, %%mm4 // top or bottom pixel moved most - V_PMAXUB ("%%mm3", "%%mm4") // top or bottom pixel moved most -- "psubusb "MANGLE(Max_Mov)", %%mm3\n\t" // moved more than allowed? or goes to 0? -+ "psubusb "_Max_Mov", %%mm3\n\t" // moved more than allowed? or goes to 0? - "pxor %%mm4, %%mm4\n\t" - "pcmpeqb %%mm4, %%mm3\n\t" // now ff where low motion, else high motion - -@@ -152,19 +152,19 @@ - V_PMAXUB ("%%mm6", "%%mm2") - - "psubusb %%mm3, %%mm2\n\t" // maybe decrease it to 0000.. if no surround motion --// "movq %%mm2, "MANGLE(Min_Vals)"\n\t" -+// "movq %%mm2, "_Min_Vals"\n\t" - - "movq %%mm0, %%mm2\n\t" - V_PMAXUB ("%%mm2", "%%mm1") - // pminub %%mm6, %%mm2 // clip our current results so far to be below this - V_PMINUB ("%%mm6", "%%mm2", "%%mm4") - "paddusb %%mm3, %%mm2\n\t" // maybe increase it to ffffff if no surround motion --// "movq %%mm2, "MANGLE(Max_Vals)"\n\t" -+// "movq %%mm2, "_Max_Vals"\n\t" - #endif - - "movq %%mm0, %%mm2\n\t" - // pavgb %%mm2, %%mm1 // avg(b,e) -- V_PAVGB ("%%mm2", "%%mm1", "%%mm3", MANGLE(ShiftMask)) // avg(b,e) -+ V_PAVGB ("%%mm2", "%%mm1", "%%mm3", _ShiftMask) // avg(b,e) - - "movq %%mm0, %%mm3\n\t" - "psubusb %%mm1, %%mm3\n\t" -diff -rup xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h ---- xine-lib-1.1.15-old/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h 2008-05-19 16:15:43.000000000 +0200 -+++ xine-lib-1.1.15/src/post/deinterlace/plugins/tomsmocomp/tomsmocompmacros.h 2008-09-20 12:04:56.000000000 +0200 -@@ -114,7 +114,7 @@ - "por %%xmm0, %%xmm5\n\t" /* and merge new & old vals */ \ - "por %%xmm2, %%xmm7\n\t" - --#define RESET_CHROMA "por "MANGLE(UVMask)", %%xmm7\n\t" -+#define RESET_CHROMA "por "_UVMask", %%xmm7\n\t" - - #else // ifdef IS_SSE2 - -@@ -126,7 +126,7 @@ - "psubusb %%mm1, %%mm2\n\t" \ - "psubusb %%mm0, %%mm3\n\t" \ - "por %%mm3, %%mm2\n\t" \ -- V_PAVGB ("%%mm0", "%%mm1", "%%mm3", MANGLE(ShiftMask)) /* avg of 2 pixels */ \ -+ V_PAVGB ("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \ - "movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \ - "pxor %%mm1, %%mm1\n\t" \ - "psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \ -@@ -144,14 +144,14 @@ - "movq "PADDR2A", %%mm1\n\t" /* our pixel2 value */ \ - "movq "PADDR1B", %%mm2\n\t" /* our 4 pixels */ \ - "movq "PADDR2B", %%mm3\n\t" /* our pixel2 value */ \ -- V_PAVGB("%%mm0", "%%mm2", "%%mm2", MANGLE(ShiftMask)) \ -- V_PAVGB("%%mm1", "%%mm3", "%%mm3", MANGLE(ShiftMask)) \ -+ V_PAVGB("%%mm0", "%%mm2", "%%mm2", _ShiftMask) \ -+ V_PAVGB("%%mm1", "%%mm3", "%%mm3", _ShiftMask) \ - "movq %%mm0, %%mm2\n\t" /* another copy of our pixel1 value */ \ - "movq %%mm1, %%mm3\n\t" /* another copy of our pixel1 value */ \ - "psubusb %%mm1, %%mm2\n\t" \ - "psubusb %%mm0, %%mm3\n\t" \ - "por %%mm3, %%mm2\n\t" \ -- V_PAVGB("%%mm0", "%%mm1", "%%mm3", MANGLE(ShiftMask)) /* avg of 2 pixels */ \ -+ V_PAVGB("%%mm0", "%%mm1", "%%mm3", _ShiftMask) /* avg of 2 pixels */ \ - "movq %%mm2, %%mm3\n\t" /* another copy of our our weights */ \ - "pxor %%mm1, %%mm1\n\t" \ - "psubusb %%mm7, %%mm3\n\t" /* nonzero where old weights lower, else 0 */ \ -@@ -164,7 +164,7 @@ - "por %%mm0, %%mm5\n\t" /* and merge new & old vals */ \ - "por %%mm2, %%mm7\n\t" - --#define RESET_CHROMA "por "MANGLE(UVMask)", %%mm7\n\t" -+#define RESET_CHROMA "por "_UVMask", %%mm7\n\t" - - #endif - diff --git a/media-libs/xine-lib/files/xine-lib-1.1.16.3-libmpcdecsv7.patch b/media-libs/xine-lib/files/xine-lib-1.1.16.3-libmpcdecsv7.patch deleted file mode 100644 index 97989d38..00000000 --- a/media-libs/xine-lib/files/xine-lib-1.1.16.3-libmpcdecsv7.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff -ur xine-lib-1.1.16.3.orig/configure.ac xine-lib-1.1.16.3/configure.ac ---- xine-lib-1.1.16.3.orig/configure.ac 2009-04-02 21:44:45.000000000 +0300 -+++ xine-lib-1.1.16.3/configure.ac 2009-07-26 15:34:10.000000000 +0300 -@@ -1341,8 +1341,8 @@ - if test "x$enable_musepack" = "xno"; then - AC_MSG_RESULT([musepack support disabled]) - elif test "x$with_external_libmpcdec" = "xyes"; then -- AC_CHECK_LIB([mpcdec], [mpc_decoder_decode], [have_mpcdec=yes]) -- AC_CHECK_HEADERS([mpcdec/mpcdec.h], , [have_mpcdec=no]) -+ AC_CHECK_LIB([mpcdecsv7], [mpc_decoder_decode], [have_mpcdec=yes]) -+ AC_CHECK_HEADERS([mpcdecsv7/mpcdec.h], , [have_mpcdec=no]) - if test "x$have_mpcdec" != "xyes"; then - AC_MSG_ERROR([Unable to find mpcdec]) - fi -diff -ur xine-lib-1.1.16.3.orig/src/libmusepack/Makefile.am xine-lib-1.1.16.3/src/libmusepack/Makefile.am ---- xine-lib-1.1.16.3.orig/src/libmusepack/Makefile.am 2009-02-10 19:32:23.000000000 +0200 -+++ xine-lib-1.1.16.3/src/libmusepack/Makefile.am 2009-07-26 15:34:27.000000000 +0300 -@@ -17,7 +17,7 @@ - endif - - if EXTERNAL_MPCDEC --xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) -lmpcdec -+xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) -lmpcdecsv7 - else - xineplug_decode_mpc_la_LIBADD = $(XINE_LIB) $(LTLIBINTL) - endif -diff -ur xine-lib-1.1.16.3.orig/src/libmusepack/xine_musepack_decoder.c xine-lib-1.1.16.3/src/libmusepack/xine_musepack_decoder.c ---- xine-lib-1.1.16.3.orig/src/libmusepack/xine_musepack_decoder.c 2009-02-10 19:32:23.000000000 +0200 -+++ xine-lib-1.1.16.3/src/libmusepack/xine_musepack_decoder.c 2009-07-26 15:34:49.000000000 +0300 -@@ -46,7 +46,7 @@ - #include "xineutils.h" - - #ifdef HAVE_MPCDEC_MPCDEC_H --# include <mpcdec/mpcdec.h> -+# include <mpcdecsv7/mpcdec.h> - #else - # include "musepack/musepack.h" - #endif diff --git a/media-libs/xine-lib/metadata.xml b/media-libs/xine-lib/metadata.xml deleted file mode 100644 index 6686277d..00000000 --- a/media-libs/xine-lib/metadata.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<herd>video</herd> -<maintainer> - <email>media-video@gentoo.org</email> -</maintainer> -<longdescription>An open source library for media applications</longdescription> -<use> - <flag name="real"> - Enable support for loading and using RealPlayer binary codecs on x86 and - amd64 Linux. Enabling this USE flag might make the package - non-redistributable in binary form. - </flag> - <flag name="win32codecs"> - Enable support for loading and using Windows 32-bit binary codecs on x86 - Linux and FreeBSD. Enabling this USE flag might make the package - non-redistributable in binary form. - </flag> - <flag name="mad"> - Build the <pkg>media-libs/libmad</pkg> based mp3 decoder. This mp3 decoder - has superior support compared to the one coming from FFmpeg that is used as - a fallback. If you experience any bad behaviour with mp3 files (skipping, - distorted sound) make sure you enabled this USE flag. - </flag> - <flag name="flac"> - Build the <pkg>media-libs/flac</pkg> based FLAC demuxer and decoder. This - flag is not needed for playing FLAC content, neither standalone nor in Ogg - container (OggFLAC), but might have better support for exotic features like - 24-bit samples or 96kHz sample rates. - </flag> - <flag name="gtk"> - Build the gdkpixbuf-based image decoder plugin. - </flag> - <flag name="imagemagick"> - Build the ImageMagick-based image decoder plugin. - </flag> - <flag name="gnome"> - Build the <pkg>gnome-base/gnome-vfs</pkg> based input plugin. This plugin is - used to access any resource that can be accessed through Nautilus's (and - others') URLs. - </flag> - <flag name="mmap"> - Use mmap() function while reading file from local disks. Using mmap() will - use more virtual memory space, but leaves to the Kernel the task of caching - the file's data. mmap() access should be faster, but might misbehave if the - device where the file resides in is removed during playback. - </flag> - <flag name="truetype"> - Use <pkg>media-libs/freetype</pkg> for font rendering and - <pkg>media-libs/fontconfig</pkg> for font discovery. Enabling this USE flag - will allow OSD (such as subtitles) to use more advanced font and to more - easily select which font to use. The support for TrueType fonts in xine-lib - is still experimental, and might not be as good looking as the bitmap fonts - used with this USE flag disabled. - </flag> - <flag name="xvmc"> - Enable support for XVideo Motion Compensation (accelerated mpeg playback). - </flag> - <flag name="dxr3"> - Enable support for DXR3 mpeg accelleration cards. - </flag> - <flag name="vidix"> - Enable support for vidix video output. - </flag> - <flag name="vis"> - Adds support for SIMD optimizations for UltraSPARC processors. - </flag> -</use> -</pkgmetadata> diff --git a/media-libs/xine-lib/xine-lib-1.1.16.3-r2.ebuild b/media-libs/xine-lib/xine-lib-1.1.16.3-r2.ebuild deleted file mode 100644 index 1ab3d1b9..00000000 --- a/media-libs/xine-lib/xine-lib-1.1.16.3-r2.ebuild +++ /dev/null @@ -1,188 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/xine-lib/xine-lib-1.1.16.3-r1.ebuild,v 1.4 2009/08/25 12:58:07 jer Exp $ - -EAPI=1 - -inherit autotools eutils flag-o-matic toolchain-funcs multilib - -# This should normally be empty string, unless a release has a suffix. -if [[ "${P/_pre/}" != "${P}" ]]; then - SRC_URI="mirror://gentoo/${P}.tar.bz2" -else - MY_PKG_SUFFIX="" - MY_P="${PN}-${PV/_/-}${MY_PKG_SUFFIX}" - S="${WORKDIR}/${MY_P}" - - SRC_URI="mirror://sourceforge/xine/${MY_P}.tar.bz2" -fi - -DESCRIPTION="Core libraries for Xine movie player" -HOMEPAGE="http://xine.sourceforge.net" - -LICENSE="GPL-2" -SLOT="1" -KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ~ppc ~ppc64 ~sparc x86 ~x86-fbsd" - -IUSE="-aalib -libcaca -arts esd win32codecs nls +dvd +X directfb +vorbis +alsa -gnome sdl speex +theora ipv6 altivec opengl aac -fbcon +xv xvmc --samba dxr3 vidix mng -flac -oss +v4l xinerama vcd +a52 +mad -imagemagick +dts -+modplug -gtk pulseaudio -mmap -truetype wavpack +musepack +xcb -jack --real +vis" - -RDEPEND="X? ( x11-libs/libXext - x11-libs/libX11 ) - xv? ( x11-libs/libXv ) - xvmc? ( x11-libs/libXvMC ) - xinerama? ( x11-libs/libXinerama ) - win32codecs? ( >=media-libs/win32codecs-0.50 ) - esd? ( media-sound/esound ) - dvd? ( >=media-libs/libdvdcss-1.2.7 ) - arts? ( kde-base/arts ) - alsa? ( media-libs/alsa-lib ) - aalib? ( media-libs/aalib ) - directfb? ( >=dev-libs/DirectFB-0.9.9 ) - gnome? ( >=gnome-base/gnome-vfs-2.0 ) - flac? ( >=media-libs/flac-1.1.2 ) - sdl? ( >=media-libs/libsdl-1.1.5 ) - dxr3? ( >=media-libs/libfame-0.9.0 ) - vorbis? ( media-libs/libogg media-libs/libvorbis ) - theora? ( media-libs/libogg media-libs/libvorbis >=media-libs/libtheora-1.0_alpha6 ) - speex? ( media-libs/libogg media-libs/libvorbis media-libs/speex ) - libcaca? ( >=media-libs/libcaca-0.99_beta14 ) - samba? ( net-fs/samba ) - mng? ( media-libs/libmng ) - vcd? ( media-video/vcdimager ) - a52? ( >=media-libs/a52dec-0.7.4-r5 ) - mad? ( media-libs/libmad ) - imagemagick? ( media-gfx/imagemagick ) - dts? ( media-libs/libdca ) - aac? ( >=media-libs/faad2-2.6.1 ) - >=media-video/ffmpeg-0.4.9_p20070129 - modplug? ( media-libs/libmodplug ) - nls? ( virtual/libintl ) - gtk? ( =x11-libs/gtk+-2* ) - pulseaudio? ( media-sound/pulseaudio ) - truetype? ( =media-libs/freetype-2* media-libs/fontconfig ) - virtual/libiconv - wavpack? ( >=media-sound/wavpack-4.31 ) - musepack? ( media-libs/libmpcdecsv7 ) - xcb? ( >=x11-libs/libxcb-1.0 ) - jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) - real? ( - x86? ( media-libs/win32codecs ) - x86-fbsd? ( media-libs/win32codecs ) - amd64? ( media-libs/amd64codecs ) )" - -DEPEND="${RDEPEND} - X? ( x11-libs/libXt - x11-proto/xproto - x11-proto/videoproto - x11-proto/xf86vidmodeproto - xinerama? ( x11-proto/xineramaproto ) ) - v4l? ( virtual/os-headers ) - dev-util/pkgconfig - sys-devel/libtool - nls? ( sys-devel/gettext )" - -src_unpack() { - unpack ${A} - cd "${S}" - rm -f ltmain.sh m4/{libtool,lt*}.m4 || die "libtool patch failed" - epatch "${FILESDIR}"/${P}-libmpcdecsv7.patch - - # Bug 164425 - epatch "${FILESDIR}"/xine-lib-1.1.15-pic-fix.patch - - eautoreconf -} - -src_compile() { - #prevent quicktime crashing - append-flags -frename-registers -ffunction-sections - - # Specific workarounds for too-few-registers arch... - if [[ $(tc-arch) == "x86" ]]; then - filter-flags -fforce-addr - filter-flags -momit-leaf-frame-pointer # break on gcc 3.4/4.x - filter-flags -fno-omit-frame-pointer #breaks per bug #149704 - is-flag -O? || append-flags -O2 - fi - - # Set the correct win32 dll path, bug #197236 - local win32dir - if has_multilib_profile ; then - win32dir=/usr/$(ABI="x86" get_libdir)/win32 - else - win32dir=/usr/$(get_libdir)/win32 - fi - - # Too many file names are the same (xine_decoder.c), change the builddir - # So that the relative path is used to identify them. - mkdir "${WORKDIR}/build" - - ECONF_SOURCE="${S}" econf \ - $(use_enable gnome gnomevfs) \ - $(use_enable nls) \ - $(use_enable ipv6) \ - $(use_enable samba) \ - $(use_enable altivec) \ - $(use_enable v4l) \ - $(use_enable mng) \ - $(use_with imagemagick) \ - $(use_enable gtk gdkpixbuf) \ - $(use_enable aac faad) --with-external-libfaad \ - $(use_with flac libflac) \ - $(use_with vorbis) \ - $(use_with speex) \ - $(use_with theora) \ - $(use_with wavpack) \ - $(use_enable modplug) \ - $(use_enable a52 a52dec) --with-external-a52dec \ - $(use_enable mad) --with-external-libmad \ - $(use_enable dts) --with-external-libdts \ - $(use_enable musepack) --with-external-libmpcdec \ - $(use_with X x) \ - $(use_enable xinerama) \ - $(use_enable vidix) \ - $(use_enable dxr3) \ - $(use_enable directfb) \ - $(use_enable fbcon fb) \ - $(use_enable opengl) \ - $(use_enable aalib) \ - $(use_with libcaca caca) \ - $(use_with sdl) \ - $(use_enable xvmc) \ - $(use_with xcb) \ - $(use_enable oss) \ - $(use_with alsa) \ - $(use_with arts) \ - $(use_with esd esound) \ - $(use_with pulseaudio) \ - $(use_with jack) \ - $(use_enable vcd) --without-internal-vcdlibs \ - $(use_enable win32codecs w32dll) \ - $(use_enable real real-codecs) \ - $(use_enable mmap) \ - $(use_with truetype freetype) $(use_with truetype fontconfig) \ - $(use_enable vis) \ - --enable-asf \ - --with-external-ffmpeg \ - --disable-optimizations \ - --disable-syncfb \ - --with-xv-path=/usr/$(get_libdir) \ - --with-w32-path=${win32dir} \ - --with-real-codecs-path=/usr/$(get_libdir)/codecs \ - --enable-fast-install \ - --disable-dependency-tracking - - emake || die "emake failed." -} - -src_install() { - emake DESTDIR="${D}" \ - docdir="/usr/share/doc/${PF}" htmldir="/usr/share/doc/${PF}/html" \ - install || die "emake install failed." - - dodoc ChangeLog -} diff --git a/net-wireless/aircrack-ng/ChangeLog b/net-wireless/aircrack-ng/ChangeLog deleted file mode 100644 index 9aea38ac..00000000 --- a/net-wireless/aircrack-ng/ChangeLog +++ /dev/null @@ -1,20 +0,0 @@ -# ChangeLog for net-wireless/aircrack-ng -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*aircrack-ng-1.0 (13 Sep 2009) - - 13 Sep 2009; Jory A. Pratt <anarchy@gentoo.org> - -aircrack-ng-1.0_rc4.ebuild, +aircrack-ng-1.0.ebuild, - -files/aircrack-ng-1.0_rc2-freebsd.patch: - Update to latest ~arch to match portage version - -*aircrack-ng-1.0_rc4 (12 Sep 2009) - - 12 Sep 2009; Magnus Granberg <zorry@ume.nu> +aircrack-ng-1.0_rc4.ebuild, - +files/aircrack-ng-1.0_rc2-freebsd.patch, - +files/aircrack-ng-1.0_rc3-respect_LDFLAGS.patch, - +files/aircrack-ng-1.0_rc4-fix_build.patch, +files/process-group-leader.c, - +metadata.xml: - Fix ticket #69 Thanks to radegand and uberpinguin - diff --git a/net-wireless/aircrack-ng/Manifest b/net-wireless/aircrack-ng/Manifest deleted file mode 100644 index fe39b3ed..00000000 --- a/net-wireless/aircrack-ng/Manifest +++ /dev/null @@ -1,7 +0,0 @@ -AUX aircrack-ng-1.0_rc3-respect_LDFLAGS.patch 3124 RMD160 7fdc53adcc92067fe275d8cf178c7ee70e960fff SHA1 9a389fe635dca311a707ce5fc516185645eff81a SHA256 cfcf81b63bd31983ade18a350ceda2ad10b8ad4362a1f9380798a94ab4191d75 -AUX aircrack-ng-1.0_rc4-fix_build.patch 347 RMD160 54c747a9f46804f9380c62beb26e66d459934104 SHA1 12ec12e38d81817caf0c9abbe95e9c21e3cc2092 SHA256 f71f8b670335e352b2165128098e19646ae41a1848aa048aa9b58fbe65651b64 -AUX process-group-leader.c 373 RMD160 2ce7341f5a58d2223590f1edfbcd1230a909024b SHA1 4653e2329b901dbb96f1380b478ea1de63d2a08b SHA256 153666625e942384648dafedbc8f37577fdf6a24060b04237913fd7f693f7bf7 -DIST aircrack-ng-1.0.tar.gz 1506412 RMD160 e8360aabbec1e7e038f86579e1004234f0899409 SHA1 8a3c5b8e322ea11e5559109a9f9d668ad6aee5f0 SHA256 65c2ad69a5522282b2c3c51daeceff70ecaff2d9ef4ff9c915a018f1d87680cd -EBUILD aircrack-ng-1.0.ebuild 2094 RMD160 ca93a1a7dd8dcdd8b3bbc2a10eec70f226510433 SHA1 244193d532309b2697cf0e73e464db85566b0a81 SHA256 0b6e7bf768ea410aee0a8a541e237900b2dd31bb0dcd57132ade725dba7a4ee2 -MISC ChangeLog 712 RMD160 b3f88df4bd1d27437f2b767b56ac423fe1f5d817 SHA1 8bd7089c82a98ea5b8eda50474202acc67a63d5b SHA256 e3231b7c84740618868b8bfdd1b30d94d8a8dcdb3ba56d23340c4de604697d1e -MISC metadata.xml 545 RMD160 74b28f94434b9af081b71806679b128b42cb8068 SHA1 b9b41decbf07297e72c3f682be1c13415df1f402 SHA256 af8903a9f2e95968febae6760b251c2145e3a26569f71ff64266ae2b4fcbbb2a diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.0.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.0.ebuild deleted file mode 100644 index a2f62e34..00000000 --- a/net-wireless/aircrack-ng/aircrack-ng-1.0.ebuild +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/aircrack-ng-1.0.ebuild,v 1.2 2009/09/11 14:10:56 arfrever Exp $ - -EAPI="2" - -inherit versionator eutils toolchain-funcs flag-o-matic - -MY_PV=$(replace_version_separator 2 '-') - -DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys" -HOMEPAGE="http://www.aircrack-ng.org" -SRC_URI="http://download.aircrack-ng.org/${PN}-${MY_PV}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~ppc ~x86" -IUSE="+sqlite kernel_linux kernel_FreeBSD" - -DEPEND="dev-libs/openssl - sqlite? ( >=dev-db/sqlite-3.4 )" -RDEPEND="${DEPEND} - kernel_linux? ( net-wireless/iw )" - -S="${WORKDIR}/${PN}-${MY_PV}" - -have_sqlite() { - use sqlite && echo "true" || echo "false" -} - -src_prepare() { - epatch "${FILESDIR}/${PN}-1.0_rc3-respect_LDFLAGS.patch" - epatch "${FILESDIR}/${PN}-1.0_rc4-fix_build.patch" -} - -src_compile() { - - # Ticket 69 - filter-flags -fPIE - - # UNSTABLE=true enables building of buddy-ng, easside-ng, tkiptun-ng and wesside-ng - emake CC="$(tc-getCC)" LD="$(tc-getLD)" sqlite=$(have_sqlite) UNSTABLE=true || die "emake failed" -} - -src_install() { - # UNSTABLE=true enables installation of buddy-ng, easside-ng, tkiptun-ng and wesside-ng - emake \ - prefix="/usr" \ - mandir="/usr/share/man/man1" \ - DESTDIR="${D}" \ - sqlite=$(have_sqlite) \ - UNSTABLE=true \ - install \ - || die "emake install failed" - - dodoc AUTHORS ChangeLog README -} - -pkg_postinst() { - # Message is (c) FreeBSD - # http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/pkg-message.in?rev=1.5 - if use kernel_FreeBSD ; then - einfo "Contrary to Linux, it is not necessary to use airmon-ng to enable the monitor" - einfo "mode of your wireless card. So do not care about what the manpages say about" - einfo "airmon-ng, airodump-ng sets monitor mode automatically." - echo - einfo "To return from monitor mode, issue the following command:" - einfo " ifconfig \${INTERFACE} -mediaopt monitor" - einfo - einfo "For aireplay-ng you need FreeBSD >= 7.0." - fi -} diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc3-respect_LDFLAGS.patch b/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc3-respect_LDFLAGS.patch deleted file mode 100644 index 2e5e4d0a..00000000 --- a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc3-respect_LDFLAGS.patch +++ /dev/null @@ -1,91 +0,0 @@ ---- src/Makefile -+++ src/Makefile -@@ -93,13 +93,13 @@ - - - OSD = osdep --LIBS = -L$(OSD) -l$(OSD) $(LIBPCAP) $(LDFLAGS) -+LIBS = -L$(OSD) -l$(OSD) $(LIBPCAP) - ifeq ($(OSNAME), cygwin) - LIBS += -liphlpapi -lsetupapi -luuid - endif - LIBOSD = $(OSD)/lib$(OSD).a - --LIBSSL = -lssl -lcrypto $(LDFLAGS) -+LIBSSL = -lssl -lcrypto - LIBSQL = - ifeq ($(SQLITE), true) - LIBSQL = -L/usr/local/lib -lsqlite3 -@@ -143,55 +143,55 @@ - aircrack-ng-opt-prof -lpthread $(LIBSQL) - - aircrack-ng$(EXE): $(OBJS_AC) -- $(CC) $(CFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AC) $(ASM_AC) -o $(@) -lpthread $(LIBSSL) $(LIBSQL) - - airdecap-ng$(EXE): $(OBJS_AD) -- $(CC) $(CFLAGS) $(OBJS_AD) -o $(@) $(LIBSSL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AD) -o $(@) $(LIBSSL) - - packetforge-ng$(EXE): $(OBJS_PF) -- $(CC) $(CFLAGS) $(OBJS_PF) -o $(@) $(LIBSSL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_PF) -o $(@) $(LIBSSL) - - aireplay-ng$(EXE): $(OBJS_AR) $(LIBOSD) -- $(CC) $(CFLAGS) $(OBJS_AR) -o $(@) $(LIBS) $(LIBSSL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AR) -o $(@) $(LIBS) $(LIBSSL) - - airodump-ng$(EXE): $(OBJS_ADU) $(LIBOSD) -- $(CC) $(CFLAGS) $(OBJS_ADU) -o $(@) $(LIBS) $(LIBSSL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_ADU) -o $(@) $(LIBS) $(LIBSSL) - - airserv-ng$(EXE): $(OBJS_AS) $(LIBOSD) -- $(CC) $(CFLAGS) $(OBJS_AS) -o $(@) $(LIBS) $(LIBPCAP) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AS) -o $(@) $(LIBS) $(LIBPCAP) - - airtun-ng$(EXE): $(OBJS_AT) $(LIBOSD) -- $(CC) $(CFLAGS) $(OBJS_AT) -o $(@) $(LIBS) $(LIBSSL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AT) -o $(@) $(LIBS) $(LIBSSL) - - ivstools$(EXE): $(OBJS_IV) -- $(CC) $(CFLAGS) $(OBJS_IV) -o $(@) $(LIBSSL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_IV) -o $(@) $(LIBSSL) - - kstats$(EXE): kstats.o -- $(CC) $(CFLAGS) kstats.o -o $(@) -+ $(CC) $(CFLAGS) $(LDFLAGS) kstats.o -o $(@) - - wesside-ng$(EXE): $(OBJS_WS) $(LIBOSD) -- $(CC) $(CFLAGS) $(OBJS_WS) -o $(@) $(LIBS) $(LIBSSL) -lz -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_WS) -o $(@) $(LIBS) $(LIBSSL) -lz - - easside-ng$(EXE): $(OBJS_ES) $(LIBOSD) -- $(CC) $(CFLAGS) $(OBJS_ES) -o $(@) $(LIBS) -lz -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_ES) -o $(@) $(LIBS) -lz - - buddy-ng$(EXE): $(OBJS_BUDDY) -- $(CC) $(CFLAGS) $(OBJS_BUDDY) -o $(@) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_BUDDY) -o $(@) - - makeivs-ng$(EXE): $(OBJS_MI) -- $(CC) $(CFLAGS) $(OBJS_MI) -o $(@) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_MI) -o $(@) - - airolib-ng$(EXE): $(OBJS_AL) -- $(CC) $(CFLAGS) $(OBJS_AL) -o $(@) $(LIBSSL) -DHAVE_REGEXP $(LIBSQL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AL) -o $(@) $(LIBSSL) -DHAVE_REGEXP $(LIBSQL) - - airbase-ng$(EXE): $(OBJS_AB) $(LIBOSD) -- $(CC) $(CFLAGS) $(OBJS_AB) -o $(@) $(LIBS) $(LIBSSL) -lpthread -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AB) -o $(@) $(LIBS) $(LIBSSL) -lpthread - - airdecloak-ng$(EXE): $(OBJS_AU) -- $(CC) $(CFLAGS) $(OBJS_AU) -o $(@) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_AU) -o $(@) - - tkiptun-ng$(EXE): $(OBJS_TT) $(LIBOSD) -- $(CC) $(CFLAGS) $(OBJS_TT) -o $(@) $(LIBS) $(LIBSSL) -+ $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_TT) -o $(@) $(LIBS) $(LIBSSL) - - strip: $(BINFILES) $(SBINFILES) - strip $(BINFILES) $(SBINFILES) diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc4-fix_build.patch b/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc4-fix_build.patch deleted file mode 100644 index a01b6827..00000000 --- a/net-wireless/aircrack-ng/files/aircrack-ng-1.0_rc4-fix_build.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- src/osdep/radiotap/ieee80211_radiotap.h -+++ src/osdep/radiotap/ieee80211_radiotap.h -@@ -38,6 +38,8 @@ - #ifndef IEEE80211RADIOTAP_H - #define IEEE80211RADIOTAP_H - -+#include <sys/types.h> -+ - /* Radiotap header version (from official NetBSD feed) */ - #define IEEE80211RADIOTAP_VERSION "1.5" - /* Base version of the radiotap packet header data */ diff --git a/net-wireless/aircrack-ng/files/process-group-leader.c b/net-wireless/aircrack-ng/files/process-group-leader.c deleted file mode 100644 index 4abdcccf..00000000 --- a/net-wireless/aircrack-ng/files/process-group-leader.c +++ /dev/null @@ -1,26 +0,0 @@ -#include <unistd.h> -#include <sys/signal.h> -#include <sys/wait.h> -#include <stdlib.h> - -int main (int argc, char *argv[]) { - pid_t pid; - - signal (SIGQUIT, SIG_IGN); - signal (SIGTERM, SIG_IGN); - setpgid (0, 0); - - pid=fork (); - if (pid == 0) { - int status; - wait (&status); - exit (WEXITSTATUS(status)); - } - else { - execv (argv[1], &argv[1]); - exit (1); - } - - return 0; -} - diff --git a/net-wireless/aircrack-ng/metadata.xml b/net-wireless/aircrack-ng/metadata.xml deleted file mode 100644 index 74485c60..00000000 --- a/net-wireless/aircrack-ng/metadata.xml +++ /dev/null @@ -1,18 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<herd>netmon</herd> -<maintainer> - <email>netmon@gentoo.org</email> - <name>Netmon herd</name> -</maintainer> -<maintainer> - <email>crypto@gentoo.org</email> - <name>Crypto herd</name> -</maintainer> -<longdescription> -aircrack is a set of tools for auditing wireless networks. -aircrack-ng is the next generation of aircrack with lots of new features. -(from http://www.aircrack-ng.org) -</longdescription> -</pkgmetadata> diff --git a/profiles/repo_name b/profiles/repo_name deleted file mode 100644 index e8748ede..00000000 --- a/profiles/repo_name +++ /dev/null @@ -1 +0,0 @@ -hardened-dev diff --git a/sys-boot/grub/ChangeLog b/sys-boot/grub/ChangeLog deleted file mode 100644 index 7df0cf86..00000000 --- a/sys-boot/grub/ChangeLog +++ /dev/null @@ -1,10 +0,0 @@ -# ChangeLog for sys-boot/grub -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*grub-0.97-r11 (05 Sep 2009) - - 05 Sep 2009; Magnus Granberg <zorry@ume.nu> +grub-0.97-r11.ebuild, - +files/grub-0.97-fpie_check.patch, +metadata.xml: - Ported the -fPIE check from Grub2 Revision 2564 - diff --git a/sys-boot/grub/Manifest b/sys-boot/grub/Manifest deleted file mode 100644 index 2098c59a..00000000 --- a/sys-boot/grub/Manifest +++ /dev/null @@ -1,10 +0,0 @@ -AUX grub-0.97-fpie_check.patch 1426 RMD160 a1b2f494e50f67fd3327eced036f6a96473d5085 SHA1 3267e7615bd67da70383b34191457d77c36a5145 SHA256 41a7990d9ffa50fc41e0a542f372c193e6b649c02d522002816fdaf9faa60dd9 -AUX grub-0.97-gcc4-hardened.patch 462 RMD160 f1429fd7ebddede7dcc243e897ae3ff24ee19e06 SHA1 75860a643ac0588ef60fcc8e26fca734b11b3dae SHA256 24f135ba1404ac68a379d21885563adec58a38a7e2c05735a9328cd78aef19c2 -AUX grub.conf.gentoo 659 RMD160 9ab841d6fdd03be3f99f109ed3dfe0a5027e66d2 SHA1 26455e5c3ba2043be970bf64ce2386119fd35f30 SHA256 5e3a209af537090456546704e52e0dee8f8600944a34184f79776523cdaa9a25 -DIST grub-0.97-patches-1.9.tar.bz2 51809 RMD160 a745902212dbd22f4d9f0bb0d563ffd44b429eaa SHA1 1d9da2df8bccef9821ebbbc2f5c5353dbd90bf4d SHA256 6b8445c9260803f059031cbe7475a45fee6499fc2dbd911288af6169455c4028 -DIST grub-0.97.tar.gz 971783 RMD160 7fb5674edf0c950bd38e94f85ff1e2909aa741f0 SHA1 2580626c4579bd99336d3af4482c346c95dac4fb SHA256 4e1d15d12dbd3e9208111d6b806ad5a9857ca8850c47877d36575b904559260b -DIST splash.xpm.gz 33856 RMD160 2fead61f91c368429e80936248bb02af2bdf15ff SHA1 98e679f9698be43426f971f89a088c053e8c804a SHA256 b95600f777331b0dd31d51c68f60f0e846e4c8b628857a41165f4e6b30e6acaf -EBUILD grub-0.97-r10.ebuild 9101 RMD160 f7616847570e143952587dc1aa1dd2737c60041a SHA1 24110a0dbff3b596fcb8ef12afb7d6ad840138cd SHA256 46bf359b9805b1b4b06b46f3d4bef0903df61d41e296660c7ce0ea8d178c146a -EBUILD grub-0.97-r11.ebuild 9154 RMD160 f60f29d7090249ed6ba49a9f2ff1d49aea5d76f0 SHA1 626962c46cdf2223202cb09c01e81fcd15a28525 SHA256 ee631ec4d57686ba4ef992d723ffaee99189dd96a9e4265c6b0974c760389be8 -MISC ChangeLog 316 RMD160 bebb6be3f4e80306483c8fc2b1385c43ea55b265 SHA1 b018a0a5204f94b3d8644ab50cfdb5f6f163aaf9 SHA256 c33bf392151e2e9f5409a332acf24b06ca379fa9b1c1d4130275eb80be474f7f -MISC metadata.xml 262 RMD160 afabce9377772aefb54102e9ef237de6bb1561f5 SHA1 c38f9b99d8a84beb40c114283d8d7ddd4ac43d9e SHA256 35a9c56d9c8418806062854a360c27690d25159524df71f28bbd4d644e8706f3 diff --git a/sys-boot/grub/files/grub-0.97-fpie_check.patch b/sys-boot/grub/files/grub-0.97-fpie_check.patch deleted file mode 100644 index 63844668..00000000 --- a/sys-boot/grub/files/grub-0.97-fpie_check.patch +++ /dev/null @@ -1,53 +0,0 @@ -2009-09-05 Magnus Granberg <zorry@ume.nu> - - # #139277 #168834 #281246 - * configure.ac: Add grub_CHECK_PIE. It check if the compiler - include -fPIE in the default specs. - * configure.ac: Check if pie_possible is yes and add -nopie - to STAGE1_CFLAGS and STAGE2_CFLAGS. - ---- configure.ac.zorry 2009-09-05 15:54:43.000000000 +0200 -+++ configure.ac 2009-09-05 16:35:48.000000000 +0200 -@@ -110,6 +110,42 @@ - fi - fi - -+AC_DEFUN(grub_CHECK_PIE,[ -+[# Position independent executable. -+pie_possible=yes] -+AC_MSG_CHECKING([whether `$CC' has `-fPIE' as default]) -+# Is this a reliable test case? -+AC_LANG_CONFTEST([[ -+#ifdef __PIE__ -+int main() { -+ return 0; -+} -+#else -+#error NO __PIE__ DEFINED -+#endif -+]]) -+ -+[# `$CC -c -o ...' might not be portable. But, oh, well... Is calling -+# `ac_compile' like this correct, after all? -+if eval "$ac_compile -S -o conftest.s" 2> /dev/null; then] -+ AC_MSG_RESULT([yes]) -+ [# Should we clear up other files as well, having called `AC_LANG_CONFTEST'? -+ rm -f conftest.s -+else -+ pie_possible=no] -+ AC_MSG_RESULT([no]) -+[fi] -+]) -+ -+# Position independent executable. -+grub_CHECK_PIE -+[# Need that, because some distributions ship compilers that include -+# `-fPIE' in the default specs. -+if [ x"$pie_possible" = xyes ]; then -+ STAGE1_CFLAGS="$STAGE1_CFLAGS -nopie" -+ STAGE2_CFLAGS="$STAGE2_CFLAGS -nopie" -+fi] -+ - AC_SUBST(STAGE1_CFLAGS) - AC_SUBST(STAGE2_CFLAGS) - AC_SUBST(GRUB_CFLAGS) diff --git a/sys-boot/grub/files/grub-0.97-gcc4-hardened.patch b/sys-boot/grub/files/grub-0.97-gcc4-hardened.patch deleted file mode 100644 index cf851888..00000000 --- a/sys-boot/grub/files/grub-0.97-gcc4-hardened.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -ruN /var/tmp/portage/sys-boot/grub-0.97-r6/work/grub-0.97/configure.ac /root/hardened/grub-0.97/configure.ac ---- /work/grub-0.97/configure.ac 2008-06-03 16:09:34.000000000 +0200 -+++ /grub-0.97/configure.ac 2008-06-04 00:24:01.000000000 +0200 -@@ -106,6 +106,7 @@ - ]) - if test "x$no_stack_protector_flag" = xyes; then - STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector" -+ GRUB_CFLAGS="$GRUB_CFLAGS -fno-stack-protector" - fi - fi - fi diff --git a/sys-boot/grub/files/grub.conf.gentoo b/sys-boot/grub/files/grub.conf.gentoo deleted file mode 100644 index 451ec6b2..00000000 --- a/sys-boot/grub/files/grub.conf.gentoo +++ /dev/null @@ -1,16 +0,0 @@ -# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook -# http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2 -# If you are not using Genkernel and you need help creating this file, you -# should consult the handbook. Alternatively, consult the grub.conf.sample that -# is included with the Grub documentation. - -default 0 -timeout 30 -#splashimage=(hd0,0)/boot/grub/splash.xpm.gz - -#title Gentoo Linux 2.6.24-r5 -#root (hd0,0) -#kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r5 root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3 udev -#initrd /boot/initramfs-genkernel-x86-2.6.24-gentoo-r5 - -# vim:ft=conf: diff --git a/sys-boot/grub/grub-0.97-r10.ebuild b/sys-boot/grub/grub-0.97-r10.ebuild deleted file mode 100644 index 44b56fd7..00000000 --- a/sys-boot/grub/grub-0.97-r10.ebuild +++ /dev/null @@ -1,280 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r10.ebuild,v 1.56 2009/08/14 18:46:05 zorry Exp $ - -# XXX: we need to review menu.lst vs grub.conf handling. We've been converting -# all systems to grub.conf (and symlinking menu.lst to grub.conf), but -# we never updated any of the source code (it still all wants menu.lst), -# and there is no indication that upstream is making the transition. - -inherit mount-boot eutils flag-o-matic toolchain-funcs autotools linux-info - -PATCHVER="1.9" # Should match the revision ideally -DESCRIPTION="GNU GRUB Legacy boot loader" -HOMEPAGE="http://www.gnu.org/software/grub/" -SRC_URI="mirror://gentoo/${P}.tar.gz - ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz - mirror://gentoo/splash.xpm.gz - mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86 ~x86-fbsd" -IUSE="custom-cflags ncurses netboot static" - -DEPEND="ncurses? ( - >=sys-libs/ncurses-5.2-r5 - amd64? ( app-emulation/emul-linux-x86-baselibs ) - )" -PROVIDE="virtual/bootloader" - -pkg_setup() { - local arch="$(tc-arch)" - case ${arch} in - amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;; - esac -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # patch breaks booting for some people #111885 - rm "${WORKDIR}"/patch/400_* - - # Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as - # discovered in bug 160801. We can change this, however, using larger values - # for this variable means that Grub needs more memory to run and boot. For a - # kernel of size N, Grub needs (N+1)*2. Advanced users should set a custom - # value in make.conf, it is possible to make kernels ~16Mb in size, but it - # needs the kitchen sink built-in. - local t="custom" - if [[ -z ${GRUB_MAX_KERNEL_SIZE} ]] ; then - case $(tc-arch) in - amd64) GRUB_MAX_KERNEL_SIZE=7 ;; - x86) GRUB_MAX_KERNEL_SIZE=3 ;; - esac - t="default" - fi - einfo "Grub will support the ${t} maximum kernel size of ${GRUB_MAX_KERNEL_SIZE} Mb (GRUB_MAX_KERNEL_SIZE)" - - sed -i \ - -e "/^#define.*EXTENDED_MEMSIZE/s,3,${GRUB_MAX_KERNEL_SIZE},g" \ - "${S}"/grub/asmstub.c \ - || die "Failed to hack memory size" - - # Bug #279536 sys-boot/grub-0.97 segfaults with >=sys-devel/gcc-4.1 SSP - epatch "${FILESDIR}"/grub-0.97-gcc4-hardened.patch - - if [[ -n ${PATCHVER} ]] ; then - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - eautoreconf - fi -} - -src_compile() { - filter-flags -fPIE #168834 - - use amd64 && multilib_toolchain_setup x86 - - unset BLOCK_SIZE #73499 - - ### i686-specific code in the boot loader is a bad idea; disabling to ensure - ### at least some compatibility if the hard drive is moved to an older or - ### incompatible system. - - # grub-0.95 added -fno-stack-protector detection, to disable ssp for stage2, - # but the objcopy's (faulty) test fails if -fstack-protector is default. - # create a cache telling configure that objcopy is ok, and add -C to econf - # to make use of the cache. - # - # CFLAGS has to be undefined running econf, else -fno-stack-protector detection fails. - # STAGE2_CFLAGS is not allowed to be used on emake command-line, it overwrites - # -fno-stack-protector detected by configure, removed from netboot's emake. - use custom-cflags || unset CFLAGS - - export grub_cv_prog_objcopy_absolute=yes #79734 - use static && append-ldflags -static - - # Per bug 216625, the emul packages do not provide .a libs for performing - # suitable static linking - if use amd64 && use static ; then - if [ -z "${GRUB_STATIC_PACKAGE_BUILDING}" ]; then - die "You must use the grub-static package if you want a static Grub on amd64!" - else - eerror "You have set GRUB_STATIC_PACKAGE_BUILDING. This" - eerror "is specifically intended for building the tarballs for the" - eerror "grub-static package via USE='static -ncurses'." - eerror "All bets are now off." - ebeep 10 - fi - fi - - # build the net-bootable grub first, but only if "netboot" is set - if use netboot ; then - econf \ - --libdir=/lib \ - --datadir=/usr/lib/grub \ - --exec-prefix=/ \ - --disable-auto-linux-mem-opt \ - --enable-diskless \ - --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \ - --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \ - --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \ - --enable-{tulip,via-rhine,w89c840} || die "netboot econf failed" - - emake w89c840_o_CFLAGS="-O" || die "making netboot stuff" - - mv -f stage2/{nbgrub,pxegrub} "${S}"/ - mv -f stage2/stage2 stage2/stage2.netboot - - make clean || die "make clean failed" - fi - - # Now build the regular grub - # Note that FFS and UFS2 support are broken for now - stage1_5 files too big - econf \ - --libdir=/lib \ - --datadir=/usr/lib/grub \ - --exec-prefix=/ \ - --disable-auto-linux-mem-opt \ - $(use_with ncurses curses) \ - || die "econf failed" - - # sanity check due to common failure - use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found" - - emake || die "making regular stuff" -} - -src_test() { - # non-default block size also give false pass/fails. - unset BLOCK_SIZE - make check || die "make check failed" -} - -src_install() { - emake DESTDIR="${D}" install || die - if use netboot ; then - exeinto /usr/lib/grub/${CHOST} - doexe nbgrub pxegrub stage2/stage2.netboot || die "netboot install" - fi - - dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO - newdoc docs/menu.lst grub.conf.sample - dodoc "${FILESDIR}"/grub.conf.gentoo - prepalldocs - - [ -n "${GRUB_STATIC_PACKAGE_BUILDING}" ] && \ - mv \ - "${D}"/usr/share/doc/${PF} \ - "${D}"/usr/share/doc/grub-static-${PF/grub-} - - insinto /usr/share/grub - doins "${DISTDIR}"/splash.xpm.gz -} - -setup_boot_dir() { - local boot_dir=$1 - local dir=${boot_dir} - - mkdir -p "${dir}" - [[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot" - dir="${dir}/grub" - if [[ ! -e ${dir} ]] ; then - mkdir "${dir}" || die "${dir} does not exist!" - fi - - # change menu.lst to grub.conf - if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then - mv -f "${dir}"/menu.lst "${dir}"/grub.conf - ewarn - ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" - ewarn - fi - - if [[ ! -e ${dir}/menu.lst ]]; then - einfo "Linking from new grub.conf name to menu.lst" - ln -snf grub.conf "${dir}"/menu.lst - fi - - if [[ -e ${dir}/stage2 ]] ; then - mv "${dir}"/stage2{,.old} - ewarn "*** IMPORTANT NOTE: you must run grub and install" - ewarn "the new version's stage1 to your MBR. Until you do," - ewarn "stage1 and stage2 will still be the old version, but" - ewarn "later stages will be the new version, which could" - ewarn "cause problems such as an unbootable system." - ewarn "This means you must use either grub-install or perform" - ewarn "root/setup manually! For more help, see the handbook:" - ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto" - ebeep - fi - - einfo "Copying files from /lib/grub, /usr/lib/grub and /usr/share/grub to ${dir}" - for x in \ - "${ROOT}"/lib*/grub/*/* \ - "${ROOT}"/usr/lib*/grub/*/* \ - "${ROOT}"/usr/share/grub/* ; do - [[ -f ${x} ]] && cp -p "${x}" "${dir}"/ - done - - if [[ ! -e ${dir}/grub.conf ]] ; then - s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo" - [[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf - [[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf - [[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf - fi - - # Per bug 218599, we support grub.conf.install for users that want to run a - # specific set of Grub setup commands rather than the default ones. - grub_config=${dir}/grub.conf.install - [[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf - if [[ -e ${grub_config} ]] ; then - egrep \ - -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \ - "${grub_config}" | \ - /sbin/grub --batch \ - --device-map="${dir}"/device.map \ - > /dev/null - fi - - # the grub default commands silently piss themselves if - # the default file does not exist ahead of time - if [[ ! -e ${dir}/default ]] ; then - grub-set-default --root-directory="${boot_dir}" default - fi - einfo "Grub has been installed to ${boot_dir} successfully." -} - -pkg_postinst() { - if [[ -n ${DONT_MOUNT_BOOT} ]]; then - elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply" - elog "the following instructions for your /boot!" - elog "Neglecting to do so may cause your system to fail to boot!" - elog - else - setup_boot_dir "${ROOT}"/boot - # Trailing output because if this is run from pkg_postinst, it gets mixed into - # the other output. - einfo "" - fi - elog "To interactively install grub files to another device such as a USB" - elog "stick, just run the following and specify the directory as prompted:" - elog " emerge --config =${PF}" - elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell" - elog "grub where to install in a non-interactive way." - -} - -pkg_config() { - local dir - if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then - einfo "Enter the directory where you want to setup grub:" - read dir - else - dir="${GRUB_ALT_INSTALLDIR}" - fi - setup_boot_dir "${dir}" -} diff --git a/sys-boot/grub/grub-0.97-r11.ebuild b/sys-boot/grub/grub-0.97-r11.ebuild deleted file mode 100644 index 00cd85e8..00000000 --- a/sys-boot/grub/grub-0.97-r11.ebuild +++ /dev/null @@ -1,281 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-boot/grub/grub-0.97-r11.ebuild,v 1.56 2009/08/14 18:46:05 zorry Exp $ - -# XXX: we need to review menu.lst vs grub.conf handling. We've been converting -# all systems to grub.conf (and symlinking menu.lst to grub.conf), but -# we never updated any of the source code (it still all wants menu.lst), -# and there is no indication that upstream is making the transition. - -inherit mount-boot eutils flag-o-matic toolchain-funcs autotools linux-info - -PATCHVER="1.9" # Should match the revision ideally -DESCRIPTION="GNU GRUB Legacy boot loader" -HOMEPAGE="http://www.gnu.org/software/grub/" -SRC_URI="mirror://gentoo/${P}.tar.gz - ftp://alpha.gnu.org/gnu/${PN}/${P}.tar.gz - mirror://gentoo/splash.xpm.gz - mirror://gentoo/${P}-patches-${PATCHVER}.tar.bz2" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 x86 ~x86-fbsd" -IUSE="custom-cflags ncurses netboot static" - -DEPEND="ncurses? ( - >=sys-libs/ncurses-5.2-r5 - amd64? ( app-emulation/emul-linux-x86-baselibs ) - )" -PROVIDE="virtual/bootloader" - -pkg_setup() { - local arch="$(tc-arch)" - case ${arch} in - amd64) CONFIG_CHECK='~IA32_EMULATION' check_extra_config ;; - esac -} - -src_unpack() { - unpack ${A} - cd "${S}" - - # patch breaks booting for some people #111885 - rm "${WORKDIR}"/patch/400_* - - # Grub will not handle a kernel larger than EXTENDED_MEMSIZE Mb as - # discovered in bug 160801. We can change this, however, using larger values - # for this variable means that Grub needs more memory to run and boot. For a - # kernel of size N, Grub needs (N+1)*2. Advanced users should set a custom - # value in make.conf, it is possible to make kernels ~16Mb in size, but it - # needs the kitchen sink built-in. - local t="custom" - if [[ -z ${GRUB_MAX_KERNEL_SIZE} ]] ; then - case $(tc-arch) in - amd64) GRUB_MAX_KERNEL_SIZE=7 ;; - x86) GRUB_MAX_KERNEL_SIZE=3 ;; - esac - t="default" - fi - einfo "Grub will support the ${t} maximum kernel size of ${GRUB_MAX_KERNEL_SIZE} Mb (GRUB_MAX_KERNEL_SIZE)" - - sed -i \ - -e "/^#define.*EXTENDED_MEMSIZE/s,3,${GRUB_MAX_KERNEL_SIZE},g" \ - "${S}"/grub/asmstub.c \ - || die "Failed to hack memory size" - - # Bug #279536 sys-boot/grub-0.97 segfaults with >=sys-devel/gcc-4.1 SSP - epatch "${FILESDIR}"/grub-0.97-gcc4-hardened.patch - - # Bugs #139277 #168834 #281246 - epatch "${FILESDIR}"/grub-0.97-fpie_check.patch - - if [[ -n ${PATCHVER} ]] ; then - EPATCH_SUFFIX="patch" - epatch "${WORKDIR}"/patch - eautoreconf - fi -} - -src_compile() { - use amd64 && multilib_toolchain_setup x86 - - unset BLOCK_SIZE #73499 - - ### i686-specific code in the boot loader is a bad idea; disabling to ensure - ### at least some compatibility if the hard drive is moved to an older or - ### incompatible system. - - # grub-0.95 added -fno-stack-protector detection, to disable ssp for stage2, - # but the objcopy's (faulty) test fails if -fstack-protector is default. - # create a cache telling configure that objcopy is ok, and add -C to econf - # to make use of the cache. - # - # CFLAGS has to be undefined running econf, else -fno-stack-protector detection fails. - # STAGE2_CFLAGS is not allowed to be used on emake command-line, it overwrites - # -fno-stack-protector detected by configure, removed from netboot's emake. - use custom-cflags || unset CFLAGS - - export grub_cv_prog_objcopy_absolute=yes #79734 - use static && append-ldflags -static - - # Per bug 216625, the emul packages do not provide .a libs for performing - # suitable static linking - if use amd64 && use static ; then - if [ -z "${GRUB_STATIC_PACKAGE_BUILDING}" ]; then - die "You must use the grub-static package if you want a static Grub on amd64!" - else - eerror "You have set GRUB_STATIC_PACKAGE_BUILDING. This" - eerror "is specifically intended for building the tarballs for the" - eerror "grub-static package via USE='static -ncurses'." - eerror "All bets are now off." - ebeep 10 - fi - fi - - # build the net-bootable grub first, but only if "netboot" is set - if use netboot ; then - econf \ - --libdir=/lib \ - --datadir=/usr/lib/grub \ - --exec-prefix=/ \ - --disable-auto-linux-mem-opt \ - --enable-diskless \ - --enable-{3c{5{03,07,09,29,95},90x},cs89x0,davicom,depca,eepro{,100}} \ - --enable-{epic100,exos205,ni5210,lance,ne2100,ni{50,65}10,natsemi} \ - --enable-{ne,ns8390,wd,otulip,rtl8139,sis900,sk-g16,smc9000,tiara} \ - --enable-{tulip,via-rhine,w89c840} || die "netboot econf failed" - - emake w89c840_o_CFLAGS="-O" || die "making netboot stuff" - - mv -f stage2/{nbgrub,pxegrub} "${S}"/ - mv -f stage2/stage2 stage2/stage2.netboot - - make clean || die "make clean failed" - fi - - # Now build the regular grub - # Note that FFS and UFS2 support are broken for now - stage1_5 files too big - econf \ - --libdir=/lib \ - --datadir=/usr/lib/grub \ - --exec-prefix=/ \ - --disable-auto-linux-mem-opt \ - $(use_with ncurses curses) \ - || die "econf failed" - - # sanity check due to common failure - use ncurses && ! grep -qs "HAVE_LIBCURSES.*1" config.h && die "USE=ncurses but curses not found" - - emake || die "making regular stuff" -} - -src_test() { - # non-default block size also give false pass/fails. - unset BLOCK_SIZE - make check || die "make check failed" -} - -src_install() { - emake DESTDIR="${D}" install || die - if use netboot ; then - exeinto /usr/lib/grub/${CHOST} - doexe nbgrub pxegrub stage2/stage2.netboot || die "netboot install" - fi - - dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO - newdoc docs/menu.lst grub.conf.sample - dodoc "${FILESDIR}"/grub.conf.gentoo - prepalldocs - - [ -n "${GRUB_STATIC_PACKAGE_BUILDING}" ] && \ - mv \ - "${D}"/usr/share/doc/${PF} \ - "${D}"/usr/share/doc/grub-static-${PF/grub-} - - insinto /usr/share/grub - doins "${DISTDIR}"/splash.xpm.gz -} - -setup_boot_dir() { - local boot_dir=$1 - local dir=${boot_dir} - - mkdir -p "${dir}" - [[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot" - dir="${dir}/grub" - if [[ ! -e ${dir} ]] ; then - mkdir "${dir}" || die "${dir} does not exist!" - fi - - # change menu.lst to grub.conf - if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ; then - mv -f "${dir}"/menu.lst "${dir}"/grub.conf - ewarn - ewarn "*** IMPORTANT NOTE: menu.lst has been renamed to grub.conf" - ewarn - fi - - if [[ ! -e ${dir}/menu.lst ]]; then - einfo "Linking from new grub.conf name to menu.lst" - ln -snf grub.conf "${dir}"/menu.lst - fi - - if [[ -e ${dir}/stage2 ]] ; then - mv "${dir}"/stage2{,.old} - ewarn "*** IMPORTANT NOTE: you must run grub and install" - ewarn "the new version's stage1 to your MBR. Until you do," - ewarn "stage1 and stage2 will still be the old version, but" - ewarn "later stages will be the new version, which could" - ewarn "cause problems such as an unbootable system." - ewarn "This means you must use either grub-install or perform" - ewarn "root/setup manually! For more help, see the handbook:" - ewarn "http://www.gentoo.org/doc/en/handbook/handbook-${ARCH}.xml?part=1&chap=10#grub-install-auto" - ebeep - fi - - einfo "Copying files from /lib/grub, /usr/lib/grub and /usr/share/grub to ${dir}" - for x in \ - "${ROOT}"/lib*/grub/*/* \ - "${ROOT}"/usr/lib*/grub/*/* \ - "${ROOT}"/usr/share/grub/* ; do - [[ -f ${x} ]] && cp -p "${x}" "${dir}"/ - done - - if [[ ! -e ${dir}/grub.conf ]] ; then - s="${ROOT}/usr/share/doc/${PF}/grub.conf.gentoo" - [[ -e "${s}" ]] && cat "${s}" >${dir}/grub.conf - [[ -e "${s}.gz" ]] && zcat "${s}.gz" >${dir}/grub.conf - [[ -e "${s}.bz2" ]] && bzcat "${s}.bz2" >${dir}/grub.conf - fi - - # Per bug 218599, we support grub.conf.install for users that want to run a - # specific set of Grub setup commands rather than the default ones. - grub_config=${dir}/grub.conf.install - [[ -e ${grub_config} ]] || grub_config=${dir}/grub.conf - if [[ -e ${grub_config} ]] ; then - egrep \ - -v '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' \ - "${grub_config}" | \ - /sbin/grub --batch \ - --device-map="${dir}"/device.map \ - > /dev/null - fi - - # the grub default commands silently piss themselves if - # the default file does not exist ahead of time - if [[ ! -e ${dir}/default ]] ; then - grub-set-default --root-directory="${boot_dir}" default - fi - einfo "Grub has been installed to ${boot_dir} successfully." -} - -pkg_postinst() { - if [[ -n ${DONT_MOUNT_BOOT} ]]; then - elog "WARNING: you have DONT_MOUNT_BOOT in effect, so you must apply" - elog "the following instructions for your /boot!" - elog "Neglecting to do so may cause your system to fail to boot!" - elog - else - setup_boot_dir "${ROOT}"/boot - # Trailing output because if this is run from pkg_postinst, it gets mixed into - # the other output. - einfo "" - fi - elog "To interactively install grub files to another device such as a USB" - elog "stick, just run the following and specify the directory as prompted:" - elog " emerge --config =${PF}" - elog "Alternately, you can export GRUB_ALT_INSTALLDIR=/path/to/use to tell" - elog "grub where to install in a non-interactive way." - -} - -pkg_config() { - local dir - if [ ! -d "${GRUB_ALT_INSTALLDIR}" ]; then - einfo "Enter the directory where you want to setup grub:" - read dir - else - dir="${GRUB_ALT_INSTALLDIR}" - fi - setup_boot_dir "${dir}" -} diff --git a/sys-boot/grub/metadata.xml b/sys-boot/grub/metadata.xml deleted file mode 100644 index 6684143e..00000000 --- a/sys-boot/grub/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<herd>base-system</herd> -<use> - <flag name='multislot'>Allow grub1 and grub2 to be installed simultaneously</flag> -</use> -</pkgmetadata> diff --git a/sys-devel/gcc/ChangeLog b/sys-devel/gcc/ChangeLog deleted file mode 100644 index 82c39545..00000000 --- a/sys-devel/gcc/ChangeLog +++ /dev/null @@ -1,16 +0,0 @@ -# ChangeLog for sys-devel/gcc -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - -*gcc-4.4.1-r1 (21 Sep 2009) - - 20 Sep 2009; Magnus Granberg <zorry@ume.nu> gcc-4.3.4-r1.ebuild, - +gcc-4.4.1-r1.ebuild, -gcc-4.4.1-r2.ebuild, -gcc-4.4.1-r3.ebuild: - Updated espf patchset to 0.3.4 and specs to 0.1.6. Added crtbeginTS.o - support. - -*gcc-4.4.1-r3 (20 Sep 2009) - - 20 Sep 2009; Magnus Granberg <zorry@ume.nu> +gcc-4.4.1-r3.ebuild, - +metadata.xml: - Update espf to 0.3.4 and specs to 0.1.6 that support crtbeginTS.o. diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest deleted file mode 100644 index 457d9b3e..00000000 --- a/sys-devel/gcc/Manifest +++ /dev/null @@ -1,15 +0,0 @@ -DIST ecj-4.3.jar 1377431 RMD160 48fa985f763838bed750aa64a2fa997734438099 SHA1 da254944309a8387aa39323fe7bb7216a4518311 SHA256 9de193ea393ed50d868b730bad6916f7a8ef4ba80216f8606d3e1a0dd886e74b -DIST gcc-4.3.4-espf-0.3.4.tar.bz2 16105 RMD160 2913dd0b2602fe0f1ca5f077d63379744027ec85 SHA1 8769d3d45b89e8716b3c9d1c0b7410b997994360 SHA256 07deff3295885875d9716bf516ae5d1bacdfcc0fa052eb2da7943e04c4d9563e -DIST gcc-4.3.4-patches-1.0.tar.bz2 74158 RMD160 3cf0f0a60996a248927d3af7b8a7a88e742d749f SHA1 885242feac53a73cc335102a78310bf729422729 SHA256 32ac6307b161b01d0f5e138564b400f9f52724f9572e02e844699e9ec7a6e425 -DIST gcc-4.3.4-specs-0.1.6.tar.bz2 1145 RMD160 c63913037b6824d5df01199b703985e96bc1af00 SHA1 630c10853e43ca30e47e8bdbbf03fa27b11143ca SHA256 6a020f7acbf9a5f7eb74c00515a3389d52b2a3c0bbf2f03b6634240d38667377 -DIST gcc-4.3.4-uclibc-patches-1.0.tar.bz2 2298 RMD160 111f83201a780a0e8af442b90edddac0465ecccb SHA1 5bbeeeec53d1a3a75a856c30dd0107606a468a03 SHA256 dc475684868cbd38abeb9759bcab1cc6f2de81ff0743a80aef2753f5b1599d00 -DIST gcc-4.3.4.tar.bz2 59368714 RMD160 f23c73a07e15faecaa1bac045f36f4d16be1ddb5 SHA1 cf5248733f26aafa361b3583e74783181eeb88b9 SHA256 e572453bdb74cc4ceebfab9ffb411d9678343dff5bf86e9338d42fdd0818aa65 -DIST gcc-4.4.1-espf-0.3.4.tar.bz2 16533 RMD160 be013f96c6ebd7770b4681e1e251171c79d0d4d2 SHA1 563d727f52092acdbdf54affcc920296c75a9e57 SHA256 3399624fecb8d95fbcc3f5be444d0cf934d7cb7920f296c3d18767615b4d2d61 -DIST gcc-4.4.1-patches-1.0.tar.bz2 11203 RMD160 64d3d6b586442db5313ea49f675371c2fb9fc617 SHA1 85159a40172be6a403c43b268bf23e788ce0697a SHA256 e83392612ff54e4485bad4bb1888b2d247489777807cfaafb8aff3578c39d163 -DIST gcc-4.4.1-specs-0.1.6.tar.bz2 1145 RMD160 c63913037b6824d5df01199b703985e96bc1af00 SHA1 630c10853e43ca30e47e8bdbbf03fa27b11143ca SHA256 6a020f7acbf9a5f7eb74c00515a3389d52b2a3c0bbf2f03b6634240d38667377 -DIST gcc-4.4.1-uclibc-patches-1.1.tar.bz2 2279 RMD160 b39cd85a9ec615511bb15c65e65aa61295699eda SHA1 8d5662e57533766ed7d63609df0c9d583771a7fc SHA256 b9592d5e14ddb8868599f1da6c2366b179d5a015a7330f819dd0e4fbf8523341 -DIST gcc-4.4.1.tar.bz2 62869928 RMD160 41cb4c76d1671b1d224d2a6e167ee183dd53d096 SHA1 9156ddb7e4cc72288ec31760d6ddc7981123a8a2 SHA256 cbefa9abd4adac0931e1b556072dcd8b32a360d4b95a94d7822c86bded803d5b -EBUILD gcc-4.3.4-r1.ebuild 2160 RMD160 24db36621fb8f0b64b18192129aab8f675551a11 SHA1 c9f89879ec410e0cadb56c643e43a57fdd45a987 SHA256 c5635804704ec3009ef72e22cfeac9dc9777ccbfba0a3dac7d2af8600f27a579 -EBUILD gcc-4.4.1-r1.ebuild 2008 RMD160 22c309a16c27a1d5ddea07ea4aaff7afd5a3aceb SHA1 ec3e33783934b518cb878fe88ecaaa0fa571ac0b SHA256 8d6135ef11cb07d24a74d14b582987fedea2acfcf748fdc13532050c237a819d -MISC ChangeLog 545 RMD160 24d595f61af1a78754edd4f49e5ff35b8a5d1fd1 SHA1 10d005494f16e48ef61aa8991cba17b624da7011 SHA256 84ce96ee526af13e8a7f87457e6462ab1e7c4dd8f1ae94a43533d630193fcb29 -MISC metadata.xml 1610 RMD160 de3ea2135f71f26100df1cc2c94f969f4fb58a10 SHA1 257abaaec0d10ed04c943b4db78f97833c6303ba SHA256 e0d36c00b5814e330850f731e2a4af8f9a1b77fde6499ce3964b7995520b13f6 diff --git a/sys-devel/gcc/gcc-4.3.4-r1.ebuild b/sys-devel/gcc/gcc-4.3.4-r1.ebuild deleted file mode 100644 index 87ab2f6f..00000000 --- a/sys-devel/gcc/gcc-4.3.4-r1.ebuild +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.3.4-r1.ebuild,v 1.2 2009/09/21 01:23:00 zorry Exp $ - -# Fixed in 4.3.4 and should be removed from the patchset -GENTOO_PATCH_EXCLUDE="69_all_gcc43-pr39013.patch" #262567 - -PATCH_VER="1.0" -UCLIBC_VER="1.0" - -ETYPE="gcc-compiler" -GCC_FILESDIR="${PORTDIR}/sys-devel/gcc/files" - -# Hardened gcc 4 stuff -ESPF_VER="0.3.4" -SPECS_VER="0.1.6" - -# arch/libc configurations known to be stable or untested with {PIE,SSP,FORTIFY}-by-default -ESPF_GLIBC_SUPPORT="amd64 x86 ppc ppc64 arm sparc sparc64" -ESPF_UCLIBC_SUPPORT="x86 arm" -# Hardened end - -inherit toolchain - -DESCRIPTION="The GNU Compiler Collection. Includes C/C++, java compilers, pie+ssp extensions, Haj Ten Brugge runtime bounds checking" - -LICENSE="GPL-3 LGPL-2.1 libgcc libstdc++" -KEYWORDS="~amd64 ~arm -hppa ~ppc ~ppc64 ~x86 -x86-fbsd" - -RDEPEND=">=sys-libs/zlib-1.1.4 - >=sys-devel/gcc-config-1.4 - virtual/libiconv - >=dev-libs/gmp-4.2.1 - >=dev-libs/mpfr-2.3 - !build? ( - gcj? ( - gtk? ( - x11-libs/libXt - x11-libs/libX11 - x11-libs/libXtst - x11-proto/xproto - x11-proto/xextproto - >=x11-libs/gtk+-2.2 - x11-libs/pango - ) - >=media-libs/libart_lgpl-2.1 - app-arch/zip - app-arch/unzip - ) - >=sys-libs/ncurses-5.2-r2 - nls? ( sys-devel/gettext ) - )" -DEPEND="${RDEPEND} - test? ( sys-devel/autogen dev-util/dejagnu ) - >=sys-apps/texinfo-4.2-r4 - >=sys-devel/bison-1.875 - sys-devel/flex - elibc_glibc? ( >=sys-libs/glibc-2.8 ) - amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) ) - ppc? ( >=${CATEGORY}/binutils-2.17 ) - ppc64? ( >=${CATEGORY}/binutils-2.17 ) - >=${CATEGORY}/binutils-2.15.94" -PDEPEND=">=sys-devel/gcc-config-1.4" -if [[ ${CATEGORY} != cross-* ]] ; then - PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )" -fi - -src_unpack() { - gcc_src_unpack - - use vanilla && return 0 - - sed -i 's/use_fixproto=yes/:/' gcc/config.gcc #PR33200 - - [[ ${CHOST} == ${CTARGET} ]] && epatch "${GCC_FILESDIR}"/gcc-spec-env.patch - - [[ ${CTARGET} == *-softfloat-* ]] && epatch "${GCC_FILESDIR}"/4.3.2/gcc-4.3.2-softfloat.patch -} diff --git a/sys-devel/gcc/gcc-4.4.1-r1.ebuild b/sys-devel/gcc/gcc-4.4.1-r1.ebuild deleted file mode 100644 index ac0cd9b4..00000000 --- a/sys-devel/gcc/gcc-4.4.1-r1.ebuild +++ /dev/null @@ -1,75 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/gcc/gcc-4.4.1-r3.ebuild,v 1.2 2009/09/20 20:30:00 zorry Exp $ - -PATCH_VER="1.0" -UCLIBC_VER="1.1" - -ETYPE="gcc-compiler" -GCC_FILESDIR="${PORTDIR}/sys-devel/gcc/files" - -# Hardened gcc 4 stuff -ESPF_VER="0.3.4" -SPECS_VER="0.1.6" - -# arch/libc configurations known to be stable or untested with {PIE,SSP,FORTIFY}-by-default -ESPF_GLIBC_SUPPORT="amd64 x86 ppc ppc64 arm sparc sparc64" -ESPF_UCLIBC_SUPPORT="x86 arm" -# Hardened end - -inherit toolchain - -DESCRIPTION="The GNU Compiler Collection. Includes C/C++, java compilers, pie+ssp extensions, Haj Ten Brugge runtime bounds checking" - -LICENSE="GPL-3 LGPL-2.1 libgcc libstdc++ gcc-runtime-library-exception-3.1" -KEYWORDS="~amd64 ~arm -hppa ~ppc ~ppc64 ~x86 -x86-fbsd" - -RDEPEND=">=sys-libs/zlib-1.1.4 - >=sys-devel/gcc-config-1.4 - virtual/libiconv - >=dev-libs/gmp-4.2.1 - >=dev-libs/mpfr-2.3 - graphite? ( - >=dev-libs/ppl-0.10 - >=dev-libs/cloog-ppl-0.15 - ) - !build? ( - gcj? ( - gtk? ( - x11-libs/libXt - x11-libs/libX11 - x11-libs/libXtst - x11-proto/xproto - x11-proto/xextproto - >=x11-libs/gtk+-2.2 - x11-libs/pango - ) - >=media-libs/libart_lgpl-2.1 - app-arch/zip - app-arch/unzip - ) - >=sys-libs/ncurses-5.2-r2 - nls? ( sys-devel/gettext ) - )" -DEPEND="${RDEPEND} - test? ( sys-devel/autogen dev-util/dejagnu ) - >=sys-apps/texinfo-4.2-r4 - >=sys-devel/bison-1.875 - amd64? ( multilib? ( gcj? ( app-emulation/emul-linux-x86-xlibs ) ) ) - >=${CATEGORY}/binutils-2.18" -PDEPEND=">=sys-devel/gcc-config-1.4" -if [[ ${CATEGORY} != cross-* ]] ; then - PDEPEND="${PDEPEND} elibc_glibc? ( >=sys-libs/glibc-2.8 )" -fi - -src_unpack() { - gcc_src_unpack - - use vanilla && return 0 - - sed -i 's/use_fixproto=yes/:/' gcc/config.gcc #PR33200 - - [[ ${CHOST} == ${CTARGET} ]] && epatch "${GCC_FILESDIR}"/gcc-spec-env.patch - - [[ ${CTARGET} == *-softfloat-* ]] && epatch "${GCC_FILESDIR}"/4.4.0/gcc-4.4.0-softfloat.patch -} diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml deleted file mode 100644 index 251dfa3c..00000000 --- a/sys-devel/gcc/metadata.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <herd>toolchain</herd> - <use> - <flag name="d">Enable support for the D programming language</flag> - <flag name="fixed-point">Enable fixed-point arithmetic support for MIPS targets - in gcc (Warning: significantly increases compile time!)</flag> - <flag name="graphite">Add support for the framework for loop - optimizations based on a polyhedral intermediate representation</flag> - <flag name="ip28">Enable building a compiler capable of building a kernel - for SGI Indigo2 Impact R10000 (IP28)</flag> - <flag name="ip32r10k">Enable building a compiler capable of building an - experimental kernel for SGI O2 w/ R1x000 CPUs (IP32)</flag> - <flag name="libffi">Build the portable foreign function interface library</flag> - <flag name="mudflap">Add support for mudflap, a pointer use checking library</flag> - <flag name="multislot">Allow for SLOTs to include minor version (3.3.4 - instead of just 3.3)</flag> - <flag name="n32">Enable n32 ABI support on mips</flag> - <flag name="n64">Enable n64 ABI support on mips</flag> - <flag name="nopie">Disable PIE support (NOT FOR GENERAL USE)</flag> - <flag name="nossp">Disable SSP support (NOT FOR GENERAL USE)</flag> - <flag name="objc">Build support for the Objective C code language</flag> - <flag name="objc++">Build support for the Objective C++ language</flag> - <flag name="objc-gc">Build support for the Objective C code language Garbage - Collector</flag> - </use> -</pkgmetadata> diff --git a/sys-libs/glibc/Manifest b/sys-libs/glibc/Manifest deleted file mode 100644 index bcbcdbb2..00000000 --- a/sys-libs/glibc/Manifest +++ /dev/null @@ -1,34 +0,0 @@ -AUX 2.5/glibc-2.5-hardened-configure-picdefault.patch 794 RMD160 7ab81bac4b9625043b1e7edea6fb5707696c144d SHA1 25a0b018eb44f3c9818876a12e9ec817e305d80b SHA256 0c0359f567e4ad2d3184618bf6ac7e6102b703eab6227c7e9a4ff4dcdeed2c91 -AUX 2.5/glibc-2.5-hardened-pie.patch 1569 RMD160 8746aeb9f9c68ca153d93cf92c9df93d0fb324d6 SHA1 c2ec8d9286af38017f5bee5a8823f642c067201d SHA256 ff9cde8857c5da89faa4039e2a81748674fbeaaa49d85c378d80711d55f2b0c1 -AUX 2.6/glibc-2.6-gentoo-chk_fail.c 9407 RMD160 230701dfacfe2481eb49e5384fe4ebb508bd3af2 SHA1 0e9330d57de714dd1ecd7040d3eabf4723cdee7c SHA256 7745c0f5d37b37959b43b41e39762fc35b877161bc5740d9d3e9a83021acbc0e -AUX 2.6/glibc-2.6-gentoo-stack_chk_fail.c 9545 RMD160 9a21c9deb6ebca5d2245e3bb50b53ce035967a5f SHA1 11ad52117fa55bbe51b429043df49767c7f58de0 SHA256 1410ded812be80d452eada5f9d6b9bd7bdb504c14f01cc27dce3e36b6f92b92a -AUX 2.6/glibc-2.6-hardened-inittls-nosysenter.patch 8674 RMD160 f4e7df0cb25292afc13e18332569d2ca288fdf92 SHA1 7f34ef26d6607321e0ec5ad0f389cb1aedf5e0da SHA256 cf58ded8fbe9fcb3dc094521feec2588c1520ff2c632b20c69d6a210325c4fcf -AUX 2.7/glibc-2.7-hardened-inittls-nosysenter.patch 8755 RMD160 b674894f3b16f63193bb8040f8a5657dce82e1f9 SHA1 79fb3a4454b85af70dac95dd79134be3fe3a9201 SHA256 b0b1bf0746f7160b89cf281502b95c38dec9cb948d6a50a907b84fd6230a2dc3 -AUX eblits/common.eblit 8751 RMD160 7e0b5242366606725ef06e0a496638cafcdac676 SHA1 aa5976529ac4a22d8924fada9fc6e50f2792902f SHA256 f32fd4017acca5f0d9aca12025ee105822030058702507b740212e8434ee36b7 -AUX eblits/pkg_postinst.eblit 1159 RMD160 4b99846819bf0471d1104a8a17dd260796644f9d SHA1 4a2980fede3edebc7960d40db7cf935c7c854859 SHA256 76c403cf5c77a3a3bb7441566335f0c8da2584eaa21f05ab400e7bb00f9db810 -AUX eblits/pkg_preinst.eblit 3285 RMD160 990d7ee7cfa1ba79a19bc6c01c05817ebfc0ee96 SHA1 3ee2fe58fa7ca246311cf5ef23fa1ccbe509cf49 SHA256 8bc7dea37213048787ce0bec61e9abe8adabb547b5385024bf2549d0a036239c -AUX eblits/pkg_setup.eblit 2357 RMD160 839227a7d00227c137e06b34cc34ae56e9fb91aa SHA1 a13f73f5f767e6fa3633d31ab72891e318b116e5 SHA256 4a100a4b2f9ca77d509411dc719d2e3a24606dd1d20a18e2ebf705a1a65398c5 -AUX eblits/src_compile.eblit 5322 RMD160 b72938a98648c744b7195f3ed62b8d9b76f33ae2 SHA1 81888c8385bd577541a8b4434efca39b57aad5ad SHA256 5a873118d72f7a851c4e87a04585adeb06a356176179a685579e740e4210639d -AUX eblits/src_install-2.6.eblit 7946 RMD160 6cc258a316b78212777ab328a3c0cb73de1616d4 SHA1 94895689b56fd712156e8ac84a2a639d8475da03 SHA256 54081c34217c230d0ff43c5df378897a37576e727fe41ee4d681767110667f3e -AUX eblits/src_install.eblit 7893 RMD160 789a4518bbb0be8a028f331e2673e423d2717a93 SHA1 7288c1bcc7f05e8aa0d4f90d4c63be128a2d225d SHA256 d5f0cb0345c33f66a90d73e7e0264867d9bcf4a137190d6ae4008d63a3b7bd56 -AUX eblits/src_test.eblit 1162 RMD160 349db09c5f2c2e412a108b8c5371adf946e1a3f0 SHA1 357ef650e1dce62d5d688133426bc62b9085009d SHA256 bac1db2da478f6e6709275c36cc1f9a98fac7fcc2e80bd8831f2077207754962 -AUX eblits/src_unpack.eblit 5134 RMD160 fba35312f25e908fa225a7803d0b194e83579d6a SHA1 e6abd0516994a86ca6836872f5acc39c4d2a866d SHA256 1edd30423009f220d98ae39e2d708fd053edfff302bfd9012b8cc4e6d81eca45 -AUX fix-sysctl_h.patch 376 RMD160 b5dd68158224b09ddc42986be02351c74f81e0a0 SHA1 5601fbea6961368bcc192aef78e96ee2c5310713 SHA256 3a589f63fd1f3f6c5a00c66a10943d3d64630aefb1eb5b37e7f2a856fcea234a -AUX glibc-2.2.2-test-lfs-timeout.patch 320 RMD160 c8baab8326b4aebf642dd5ab512fbebf2371e9d9 SHA1 df2a868fba86adba184ae9750e9dee3b2ec300a5 SHA256 28e7ebc92ed93a12daf5357f07537be3daed5f4717a075c77a3ad248ec99dcf0 -AUX glibc-sec-hotfix-20040804.patch 4319 RMD160 6f7f58794273ed0736653a09e823e8ac3031ed29 SHA1 1d86c62d5c52b59881eab006b36e3a9891607887 SHA256 9d950b2f45cfbdae6df590137e4aae938380673449fe4507536557fb4c797393 -AUX glibc-sec-hotfix-20040916.patch 3080 RMD160 3419ab628d16045042f5df9e487386e03c8d979d SHA1 b69cfa5115746f2d38fa301a55d68efe88f7bcff SHA256 9f48a55f4207bdf4a9496680f09661a06d4a4bd11dad11cb0986949c0d3cc35d -AUX locales.build 699 RMD160 2a186105be5b00ec48aedef734e9dba5aee19895 SHA1 02ce7b63d60da7bb4b936969721f78486ffe9788 SHA256 094a5e02148d522be5a5ec2b95fb7305d5503f6d13d1ffa9088e9dad21af1c8a -AUX nscd 1621 RMD160 f6d20c4c3814f70d7741f3fa2e0b53ba32c37960 SHA1 5751fe798024c2021b7b3ed3e798618e2a38244a SHA256 6165db3a2fcb251d4f3655c0461e018ce9c92a37f7f22a8fd2b75178b5435bc8 -AUX nscd.conf 1158 RMD160 50651e89a0cb206b1d37dae8840527694fe561b5 SHA1 5f5166aa6e0bffa57c52c39d3ec51ad3b0efa607 SHA256 378b7953adf5aa0e03bff49b7c654cae67b3efee7c92361b385fe7d3e9fb57c7 -AUX nsswitch.conf 503 RMD160 f375f92f6b41029c93382c39cef896261b140cfc SHA1 42f7f5cc3de75c69bf60d806ac8490106ea63326 SHA256 6c38b8642d5da884327ad678d0351d57be3621562253bd9711394bad87e45e2d -AUX test-__thread.c 53 RMD160 dcc9960f3bf26c935f41dc5c408613963885ad58 SHA1 dcb60595b2730a8a05eb045563f13cd615830acf SHA256 28a7836b810cf21f6071126d6b19dbdbf567f2544f9283700d125ad653d7519e -AUX test-sysctl_h.c 54 RMD160 b7c2e5956e0a232193610701ccc57a8d56615a36 SHA1 d727fbe809fbec9157661fbdb6c8077a68d95044 SHA256 19337cae62f1ebc23ca8d8de8a98e7f03c9dd77a671100995d6e7c8a3833e759 -DIST glibc-2.8-20080602.tar.bz2 16235726 RMD160 8781f2b1dbd22c6579208a689be38a444b5242c7 SHA1 68c2bfcf5f385449c3cb7efbf1f0d425d14cdaad SHA256 142eaba19eb85121206ee034fd828ca5dcd1bf2bfa940fef92c37457c06a6d48 -DIST glibc-2.8-patches-6.tar.bz2 103171 RMD160 c6a9710e53fa6b3698aea1a5f0a497155cf2a1c5 SHA1 39fe516a150621fc34418e23ac1c38cb1f7c1406 SHA256 dc335095de83ff4ff405c9aaf5b3ee3d82148888c73b31081ae1c706510973c2 -DIST glibc-2.8-ports-20080602.tar.bz2 469234 RMD160 57ae79a79c6f82f5ff217e9052f4569c136dca7d SHA1 c3a45ea27c9eb1bf99f1caafe085b50951089384 SHA256 1f3665e80b5832f7d281c109bc2f5412521cc9ccc3bd7b499fd493ff5eb9aa9b -DIST glibc-2.9-20081201.tar.bz2 16430489 RMD160 1e1feb4ee9c0892a0544c05adb6dd249544621cf SHA1 5756ca3b543a370c4ec9ffc8038b72bf0aa61c71 SHA256 6f8e515775e20ed48610860d10315adda418a3649b3465f36ee5cd467364a8f6 -DIST glibc-2.9-patches-5.tar.bz2 101693 RMD160 8cd377be020bf95a30862d77c215c16dc544602f SHA1 103839660f4e55871bf68835f8fec83d9afecdec SHA256 6f61c3e212c82eb118780573ac80d61835ff3a98fbea68b6f03a52009cce7d35 -DIST glibc-2.9-ports-20081201.tar.bz2 487663 RMD160 80eb0035ed2e021e79755d4151ccd6d73cd78d8d SHA1 90a6ecbce37aabe6093c4dd0c8817cbf86321627 SHA256 19bb6e89855171d7ae01aef92054dfe4524521fbc13c67bfaa3ee81944210744 -EBUILD glibc-2.8_p20080602-r3.ebuild 13728 RMD160 d30e8a99f4457056fae2a1b9ef239f0466b45367 SHA1 a314d2b0c3c1c3bc308f25c4faa1d16bd8ca274c SHA256 f46a10aa3391d5bdd1e3b6ed1594c38029c82c56b56d8f7d4b86e1bb4c1340f5 -EBUILD glibc-2.9_p20081201-r4.ebuild 8023 RMD160 bccf2564ea221ee4d4d3982fe060d5043ba0e98a SHA1 8a9de34e334928195ae148742442a958e8cd9e56 SHA256 73193ce7c305620cbbf83d0ecb2f6118cc1624de471f27cdd4dd0f9ed3cebd80 -MISC metadata.xml 1112 RMD160 1aa9770356149948593ebe35a1bd3940dd72fca2 SHA1 40514cc45c26bab671d78aa1567441bf72b0c6cc SHA256 4acea698dc4f66c17f4f3f81b28cd6b32f5425fd49f380df4a016489f786b1f5 diff --git a/sys-libs/glibc/files/2.5/glibc-2.5-hardened-configure-picdefault.patch b/sys-libs/glibc/files/2.5/glibc-2.5-hardened-configure-picdefault.patch deleted file mode 100644 index 253a61bb..00000000 --- a/sys-libs/glibc/files/2.5/glibc-2.5-hardened-configure-picdefault.patch +++ /dev/null @@ -1,29 +0,0 @@ -Prevent default-fPIE from confusing configure into thinking -PIC code is default. This causes glibc to build both PIC and -non-PIC code as normal, which on the hardened compiler generates -PIC and PIE. - -Patch by Kevin F. Quinn <kevquinn@gentoo.org> - ---- configure.in -+++ configure.in -@@ -2145,7 +2145,7 @@ - # error PIC is default. - #endif - EOF --if eval "${CC-cc} -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then -+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&AS_MESSAGE_LOG_FD 1>&AS_MESSAGE_LOG_FD"; then - pic_default=no - fi - rm -f conftest.*]) ---- configure -+++ configure -@@ -7698,7 +7698,7 @@ - # error PIC is default. - #endif - EOF --if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then -+if eval "${CC-cc} -fno-PIE -S conftest.c 2>&5 1>&5"; then - pic_default=no - fi - rm -f conftest.* diff --git a/sys-libs/glibc/files/2.5/glibc-2.5-hardened-pie.patch b/sys-libs/glibc/files/2.5/glibc-2.5-hardened-pie.patch deleted file mode 100644 index 46f3de4f..00000000 --- a/sys-libs/glibc/files/2.5/glibc-2.5-hardened-pie.patch +++ /dev/null @@ -1,39 +0,0 @@ -Change link commands for glibc executables to build PIEs - -Patch by Kevin F. Quinn <kevquinn@gentoo.org> - ---- Makeconfig -+++ Makeconfig -@@ -415,10 +415,10 @@ - - # Command for linking programs with the C library. - ifndef +link --+link = $(CC) -nostdlib -nostartfiles -o $@ \ -++link = $(CC) -nostdlib -nostartfiles -fPIE -pie -o $@ \ - $(sysdep-LDFLAGS) $(config-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ - $(combreloc-LDFLAGS) $(relro-LDFLAGS) $(hashstyle-LDFLAGS) \ -- $(addprefix $(csu-objpfx),$(start-installed-name)) \ -+ $(addprefix $(csu-objpfx),S$(start-installed-name)) \ - $(+preinit) $(+prector) \ - $(filter-out $(addprefix $(csu-objpfx),start.o \ - $(start-installed-name))\ -@@ -429,7 +429,7 @@ - ifndef +link-static - +link-static = $(CC) -nostdlib -nostartfiles -static -o $@ \ - $(sysdep-LDFLAGS) $(LDFLAGS) $(LDFLAGS-$(@F)) \ -- $(addprefix $(csu-objpfx),$(static-start-installed-name)) \ -+ $(addprefix $(csu-objpfx),S$(static-start-installed-name)) \ - $(+preinit) $(+prector) \ - $(filter-out $(addprefix $(csu-objpfx),start.o \ - $(start-installed-name))\ -@@ -528,8 +528,8 @@ - ifeq ($(elf),yes) - +preinit = $(addprefix $(csu-objpfx),crti.o) - +postinit = $(addprefix $(csu-objpfx),crtn.o) --+prector = `$(CC) --print-file-name=crtbegin.o` --+postctor = `$(CC) --print-file-name=crtend.o` -++prector = `$(CC) --print-file-name=crtbeginS.o` -++postctor = `$(CC) --print-file-name=crtendS.o` - +interp = $(addprefix $(elf-objpfx),interp.os) - endif - csu-objpfx = $(common-objpfx)csu/ diff --git a/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-chk_fail.c b/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-chk_fail.c deleted file mode 100644 index 37711e8a..00000000 --- a/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-chk_fail.c +++ /dev/null @@ -1,315 +0,0 @@ -/* Copyright (C) 2004, 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Copyright (C) 2006-2008 Gentoo Foundation Inc. - * License terms as above. - * - * Hardened Gentoo SSP and FORTIFY handler - * - * An SSP failure handler that does not use functions from the rest of - * glibc; it uses the INTERNAL_SYSCALL methods directly. This ensures - * no possibility of recursion into the handler. - * - * Direct all bug reports to http://bugs.gentoo.org/ - * - * Re-written from the glibc-2.3 Hardened Gentoo SSP handler - * by Kevin F. Quinn - <kevquinn[@]gentoo.org> - * - * The following people contributed to the glibc-2.3 Hardened - * Gentoo SSP and FORTIFY handler, from which this implementation draws much: - * - * Ned Ludd - <solar[@]gentoo.org> - * Alexander Gabert - <pappy[@]gentoo.org> - * The PaX Team - <pageexec[@]freemail.hu> - * Peter S. Mazinger - <ps.m[@]gmx.net> - * Yoann Vandoorselaere - <yoann[@]prelude-ids.org> - * Robert Connolly - <robert[@]linuxfromscratch.org> - * Cory Visi <cory[@]visi.name> - * Mike Frysinger <vapier[@]gentoo.org> - * Magnus Granberg <zorry[@]ume.nu> - */ - -#include <stdio.h> -#include <stdlib.h> -#include <errno.h> -#include <unistd.h> -#include <signal.h> - -#include <sys/types.h> - -#include <sysdep-cancel.h> -#include <sys/syscall.h> -#include <bp-checks.h> - -#include <kernel-features.h> - -#include <alloca.h> -/* from sysdeps */ -#include <socketcall.h> -/* for the stuff in bits/socket.h */ -#include <sys/socket.h> -#include <sys/un.h> - -/* Sanity check on SYSCALL macro names - force compilation - * failure if the names used here do not exist - */ -#if !defined __NR_socketcall && !defined __NR_socket -# error Cannot do syscall socket or socketcall -#endif -#if !defined __NR_socketcall && !defined __NR_connect -# error Cannot do syscall connect or socketcall -#endif -#ifndef __NR_write -# error Cannot do syscall write -#endif -#ifndef __NR_close -# error Cannot do syscall close -#endif -#ifndef __NR_getpid -# error Cannot do syscall getpid -#endif -#ifndef __NR_kill -# error Cannot do syscall kill -#endif -#ifndef __NR_exit -# error Cannot do syscall exit -#endif -#ifdef SSP_SMASH_DUMPS_CORE -# define ENABLE_SSP_SMASH_DUMPS_CORE 1 -# if !defined _KERNEL_NSIG && !defined _NSIG -# error No _NSIG or _KERNEL_NSIG for rt_sigaction -# endif -# if !defined __NR_sigaction && !defined __NR_rt_sigaction -# error Cannot do syscall sigaction or rt_sigaction -# endif -/* Although rt_sigaction expects sizeof(sigset_t) - it expects the size - * of the _kernel_ sigset_t which is not the same as the user sigset_t. - * Most arches have this as _NSIG bits - mips has _KERNEL_NSIG bits for - * some reason. - */ -# ifdef _KERNEL_NSIG -# define _SSP_NSIG _KERNEL_NSIG -# else -# define _SSP_NSIG _NSIG -# endif -#else -# define _SSP_NSIG 0 -# define ENABLE_SSP_SMASH_DUMPS_CORE 0 -#endif - -/* Define DO_SIGACTION - default to newer rt signal interface but - * fallback to old as needed. - */ -#ifdef __NR_rt_sigaction -# define DO_SIGACTION(signum, act, oldact) \ - INLINE_SYSCALL(rt_sigaction, 4, signum, act, oldact, _SSP_NSIG/8) -#else -# define DO_SIGACTION(signum, act, oldact) \ - INLINE_SYSCALL(sigaction, 3, signum, act, oldact) -#endif - -/* Define DO_SOCKET/DO_CONNECT functions to deal with socketcall vs socket/connect */ -#if defined(__NR_socket) && defined(__NR_connect) -# define USE_OLD_SOCKETCALL 0 -#else -# define USE_OLD_SOCKETCALL 1 -#endif - -/* stub out the __NR_'s so we can let gcc optimize away dead code */ -#ifndef __NR_socketcall -# define __NR_socketcall 0 -#endif -#ifndef __NR_socket -# define __NR_socket 0 -#endif -#ifndef __NR_connect -# define __NR_connect 0 -#endif -#define DO_SOCKET(result, domain, type, protocol) \ - do { \ - if (USE_OLD_SOCKETCALL) { \ - socketargs[0] = domain; \ - socketargs[1] = type; \ - socketargs[2] = protocol; \ - socketargs[3] = 0; \ - result = INLINE_SYSCALL(socketcall, 2, SOCKOP_socket, socketargs); \ - } else \ - result = INLINE_SYSCALL(socket, 3, domain, type, protocol); \ - } while (0) -#define DO_CONNECT(result, sockfd, serv_addr, addrlen) \ - do { \ - if (USE_OLD_SOCKETCALL) { \ - socketargs[0] = sockfd; \ - socketargs[1] = (unsigned long int)serv_addr; \ - socketargs[2] = addrlen; \ - socketargs[3] = 0; \ - result = INLINE_SYSCALL(socketcall, 2, SOCKOP_connect, socketargs); \ - } else \ - result = INLINE_SYSCALL(connect, 3, sockfd, serv_addr, addrlen); \ - } while (0) - -#ifndef _PATH_LOG -# define _PATH_LOG "/dev/log" -#endif - -static const char path_log[] = _PATH_LOG; - -/* For building glibc with SSP switched on, define __progname to a - * constant if building for the run-time loader, to avoid pulling - * in more of libc.so into ld.so - */ -#ifdef IS_IN_rtld -static char *__progname = "<rtld>"; -#else -extern char *__progname; -#endif - -/* Common handler code, used by chk_fail - * Inlined to ensure no self-references to the handler within itself. - * Data static to avoid putting more than necessary on the stack, - * to aid core debugging. - */ -__attribute__ ((__noreturn__ , __always_inline__)) -static inline void -__hardened_gentoo_chk_fail(char func[], int damaged) -{ -#define MESSAGE_BUFSIZ 256 - static pid_t pid; - static int plen, i; - static char message[MESSAGE_BUFSIZ]; - static const char msg_ssa[] = ": buffer overflow attack"; - static const char msg_inf[] = " in function "; - static const char msg_ssd[] = "*** buffer overflow detected ***: "; - static const char msg_terminated[] = " - terminated\n"; - static const char msg_report[] = "Report to http://bugs.gentoo.org/\n"; - static const char msg_unknown[] = "<unknown>"; - static int log_socket, connect_result; - static struct sockaddr_un sock; - static unsigned long int socketargs[4]; - - /* Build socket address - */ - sock.sun_family = AF_UNIX; - i = 0; - while ((path_log[i] != '\0') && (i<(sizeof(sock.sun_path)-1))) { - sock.sun_path[i] = path_log[i]; - i++; - } - sock.sun_path[i] = '\0'; - - /* Try SOCK_DGRAM connection to syslog */ - connect_result = -1; - DO_SOCKET(log_socket, AF_UNIX, SOCK_DGRAM, 0); - if (log_socket != -1) - DO_CONNECT(connect_result, log_socket, &sock, sizeof(sock)); - if (connect_result == -1) { - if (log_socket != -1) - INLINE_SYSCALL(close, 1, log_socket); - /* Try SOCK_STREAM connection to syslog */ - DO_SOCKET(log_socket, AF_UNIX, SOCK_STREAM, 0); - if (log_socket != -1) - DO_CONNECT(connect_result, log_socket, &sock, sizeof(sock)); - } - - /* Build message. Messages are generated both in the old style and new style, - * so that log watchers that are configured for the old-style message continue - * to work. - */ -#define strconcat(str) \ - {i=0; while ((str[i] != '\0') && ((i+plen)<(MESSAGE_BUFSIZ-1))) \ - {\ - message[plen+i]=str[i];\ - i++;\ - }\ - plen+=i;} - - /* R.Henderson post-gcc-4 style message */ - plen = 0; - strconcat(msg_ssd); - if (__progname != (char *)0) - strconcat(__progname) - else - strconcat(msg_unknown); - strconcat(msg_terminated); - - /* Write out error message to STDERR, to syslog if open */ - INLINE_SYSCALL(write, 3, STDERR_FILENO, message, plen); - if (connect_result != -1) - INLINE_SYSCALL(write, 3, log_socket, message, plen); - - /* Dr. Etoh pre-gcc-4 style message */ - plen = 0; - if (__progname != (char *)0) - strconcat(__progname) - else - strconcat(msg_unknown); - strconcat(msg_ssa); - strconcat(msg_inf); - if (func != NULL) - strconcat(func) - else - strconcat(msg_unknown); - strconcat(msg_terminated); - /* Write out error message to STDERR, to syslog if open */ - INLINE_SYSCALL(write, 3, STDERR_FILENO, message, plen); - if (connect_result != -1) - INLINE_SYSCALL(write, 3, log_socket, message, plen); - - /* Direct reports to bugs.gentoo.org */ - plen=0; - strconcat(msg_report); - message[plen++]='\0'; - - /* Write out error message to STDERR, to syslog if open */ - INLINE_SYSCALL(write, 3, STDERR_FILENO, message, plen); - if (connect_result != -1) - INLINE_SYSCALL(write, 3, log_socket, message, plen); - - if (log_socket != -1) - INLINE_SYSCALL(close, 1, log_socket); - - /* Suicide */ - pid = INLINE_SYSCALL(getpid, 0); - - if (ENABLE_SSP_SMASH_DUMPS_CORE) { - static struct sigaction default_abort_act; - /* Remove any user-supplied handler for SIGABRT, before using it */ - default_abort_act.sa_handler = SIG_DFL; - default_abort_act.sa_sigaction = NULL; - __sigfillset(&default_abort_act.sa_mask); - default_abort_act.sa_flags = 0; - if (DO_SIGACTION(SIGABRT, &default_abort_act, NULL) == 0) - INLINE_SYSCALL(kill, 2, pid, SIGABRT); - } - - /* Note; actions cannot be added to SIGKILL */ - INLINE_SYSCALL(kill, 2, pid, SIGKILL); - - /* In case the kill didn't work, exit anyway - * The loop prevents gcc thinking this routine returns - */ - while (1) - INLINE_SYSCALL(exit, 0); -} - -__attribute__ ((__noreturn__)) -void __chk_fail(void) -{ - __hardened_gentoo_chk_fail(NULL, 0); -} - diff --git a/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-stack_chk_fail.c b/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-stack_chk_fail.c deleted file mode 100644 index 217bf1a9..00000000 --- a/sys-libs/glibc/files/2.6/glibc-2.6-gentoo-stack_chk_fail.c +++ /dev/null @@ -1,321 +0,0 @@ -/* Copyright (C) 2005 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA - 02111-1307 USA. */ - -/* Copyright (C) 2006-2007 Gentoo Foundation Inc. - * License terms as above. - * - * Hardened Gentoo SSP handler - * - * An SSP failure handler that does not use functions from the rest of - * glibc; it uses the INTERNAL_SYSCALL methods directly. This ensures - * no possibility of recursion into the handler. - * - * Direct all bug reports to http://bugs.gentoo.org/ - * - * Re-written from the glibc-2.3 Hardened Gentoo SSP handler - * by Kevin F. Quinn - <kevquinn[@]gentoo.org> - * - * The following people contributed to the glibc-2.3 Hardened - * Gentoo SSP handler, from which this implementation draws much: - * - * Ned Ludd - <solar[@]gentoo.org> - * Alexander Gabert - <pappy[@]gentoo.org> - * The PaX Team - <pageexec[@]freemail.hu> - * Peter S. Mazinger - <ps.m[@]gmx.net> - * Yoann Vandoorselaere - <yoann[@]prelude-ids.org> - * Robert Connolly - <robert[@]linuxfromscratch.org> - * Cory Visi <cory[@]visi.name> - * Mike Frysinger <vapier[@]gentoo.org> - */ - -#include <errno.h> -#include <stdlib.h> -#include <unistd.h> -#include <signal.h> - -#include <sys/types.h> - -#include <sysdep-cancel.h> -#include <sys/syscall.h> -#include <bp-checks.h> - -#include <kernel-features.h> - -#include <alloca.h> -/* from sysdeps */ -#include <socketcall.h> -/* for the stuff in bits/socket.h */ -#include <sys/socket.h> -#include <sys/un.h> - - -/* Sanity check on SYSCALL macro names - force compilation - * failure if the names used here do not exist - */ -#if !defined __NR_socketcall && !defined __NR_socket -# error Cannot do syscall socket or socketcall -#endif -#if !defined __NR_socketcall && !defined __NR_connect -# error Cannot do syscall connect or socketcall -#endif -#ifndef __NR_write -# error Cannot do syscall write -#endif -#ifndef __NR_close -# error Cannot do syscall close -#endif -#ifndef __NR_getpid -# error Cannot do syscall getpid -#endif -#ifndef __NR_kill -# error Cannot do syscall kill -#endif -#ifndef __NR_exit -# error Cannot do syscall exit -#endif -#ifdef SSP_SMASH_DUMPS_CORE -# define ENABLE_SSP_SMASH_DUMPS_CORE 1 -# if !defined _KERNEL_NSIG && !defined _NSIG -# error No _NSIG or _KERNEL_NSIG for rt_sigaction -# endif -# if !defined __NR_sigaction && !defined __NR_rt_sigaction -# error Cannot do syscall sigaction or rt_sigaction -# endif -/* Although rt_sigaction expects sizeof(sigset_t) - it expects the size - * of the _kernel_ sigset_t which is not the same as the user sigset_t. - * Most arches have this as _NSIG bits - mips has _KERNEL_NSIG bits for - * some reason. - */ -# ifdef _KERNEL_NSIG -# define _SSP_NSIG _KERNEL_NSIG -# else -# define _SSP_NSIG _NSIG -# endif -#else -# define _SSP_NSIG 0 -# define ENABLE_SSP_SMASH_DUMPS_CORE 0 -#endif - -/* Define DO_SIGACTION - default to newer rt signal interface but - * fallback to old as needed. - */ -#ifdef __NR_rt_sigaction -# define DO_SIGACTION(signum, act, oldact) \ - INLINE_SYSCALL(rt_sigaction, 4, signum, act, oldact, _SSP_NSIG/8) -#else -# define DO_SIGACTION(signum, act, oldact) \ - INLINE_SYSCALL(sigaction, 3, signum, act, oldact) -#endif - -/* Define DO_SOCKET/DO_CONNECT functions to deal with socketcall vs socket/connect */ -#if defined(__NR_socket) && defined(__NR_connect) -# define USE_OLD_SOCKETCALL 0 -#else -# define USE_OLD_SOCKETCALL 1 -#endif -/* stub out the __NR_'s so we can let gcc optimize away dead code */ -#ifndef __NR_socketcall -# define __NR_socketcall 0 -#endif -#ifndef __NR_socket -# define __NR_socket 0 -#endif -#ifndef __NR_connect -# define __NR_connect 0 -#endif -#define DO_SOCKET(result, domain, type, protocol) \ - do { \ - if (USE_OLD_SOCKETCALL) { \ - socketargs[0] = domain; \ - socketargs[1] = type; \ - socketargs[2] = protocol; \ - socketargs[3] = 0; \ - result = INLINE_SYSCALL(socketcall, 2, SOCKOP_socket, socketargs); \ - } else \ - result = INLINE_SYSCALL(socket, 3, domain, type, protocol); \ - } while (0) -#define DO_CONNECT(result, sockfd, serv_addr, addrlen) \ - do { \ - if (USE_OLD_SOCKETCALL) { \ - socketargs[0] = sockfd; \ - socketargs[1] = (unsigned long int)serv_addr; \ - socketargs[2] = addrlen; \ - socketargs[3] = 0; \ - result = INLINE_SYSCALL(socketcall, 2, SOCKOP_connect, socketargs); \ - } else \ - result = INLINE_SYSCALL(connect, 3, sockfd, serv_addr, addrlen); \ - } while (0) - -#ifndef _PATH_LOG -# define _PATH_LOG "/dev/log" -#endif - -static const char path_log[] = _PATH_LOG; - -/* For building glibc with SSP switched on, define __progname to a - * constant if building for the run-time loader, to avoid pulling - * in more of libc.so into ld.so - */ -#ifdef IS_IN_rtld -static char *__progname = "<rtld>"; -#else -extern char *__progname; -#endif - - -/* Common handler code, used by stack_chk_fail and __stack_smash_handler - * Inlined to ensure no self-references to the handler within itself. - * Data static to avoid putting more than necessary on the stack, - * to aid core debugging. - */ -__attribute__ ((__noreturn__ , __always_inline__)) -static inline void -__hardened_gentoo_stack_chk_fail(char func[], int damaged) -{ -#define MESSAGE_BUFSIZ 256 - static pid_t pid; - static int plen, i; - static char message[MESSAGE_BUFSIZ]; - static const char msg_ssa[] = ": stack smashing attack"; - static const char msg_inf[] = " in function "; - static const char msg_ssd[] = "*** stack smashing detected ***: "; - static const char msg_terminated[] = " - terminated\n"; - static const char msg_report[] = "Report to http://bugs.gentoo.org/\n"; - static const char msg_unknown[] = "<unknown>"; - static int log_socket, connect_result; - static struct sockaddr_un sock; - static unsigned long int socketargs[4]; - - /* Build socket address - */ - sock.sun_family = AF_UNIX; - i = 0; - while ((path_log[i] != '\0') && (i<(sizeof(sock.sun_path)-1))) { - sock.sun_path[i] = path_log[i]; - i++; - } - sock.sun_path[i] = '\0'; - - /* Try SOCK_DGRAM connection to syslog */ - connect_result = -1; - DO_SOCKET(log_socket, AF_UNIX, SOCK_DGRAM, 0); - if (log_socket != -1) - DO_CONNECT(connect_result, log_socket, &sock, sizeof(sock)); - if (connect_result == -1) { - if (log_socket != -1) - INLINE_SYSCALL(close, 1, log_socket); - /* Try SOCK_STREAM connection to syslog */ - DO_SOCKET(log_socket, AF_UNIX, SOCK_STREAM, 0); - if (log_socket != -1) - DO_CONNECT(connect_result, log_socket, &sock, sizeof(sock)); - } - - /* Build message. Messages are generated both in the old style and new style, - * so that log watchers that are configured for the old-style message continue - * to work. - */ -#define strconcat(str) \ - {i=0; while ((str[i] != '\0') && ((i+plen)<(MESSAGE_BUFSIZ-1))) \ - {\ - message[plen+i]=str[i];\ - i++;\ - }\ - plen+=i;} - - /* R.Henderson post-gcc-4 style message */ - plen = 0; - strconcat(msg_ssd); - if (__progname != (char *)0) - strconcat(__progname) - else - strconcat(msg_unknown); - strconcat(msg_terminated); - - /* Write out error message to STDERR, to syslog if open */ - INLINE_SYSCALL(write, 3, STDERR_FILENO, message, plen); - if (connect_result != -1) - INLINE_SYSCALL(write, 3, log_socket, message, plen); - - /* Dr. Etoh pre-gcc-4 style message */ - plen = 0; - if (__progname != (char *)0) - strconcat(__progname) - else - strconcat(msg_unknown); - strconcat(msg_ssa); - strconcat(msg_inf); - if (func != NULL) - strconcat(func) - else - strconcat(msg_unknown); - strconcat(msg_terminated); - /* Write out error message to STDERR, to syslog if open */ - INLINE_SYSCALL(write, 3, STDERR_FILENO, message, plen); - if (connect_result != -1) - INLINE_SYSCALL(write, 3, log_socket, message, plen); - - /* Direct reports to bugs.gentoo.org */ - plen=0; - strconcat(msg_report); - message[plen++]='\0'; - - /* Write out error message to STDERR, to syslog if open */ - INLINE_SYSCALL(write, 3, STDERR_FILENO, message, plen); - if (connect_result != -1) - INLINE_SYSCALL(write, 3, log_socket, message, plen); - - if (log_socket != -1) - INLINE_SYSCALL(close, 1, log_socket); - - /* Suicide */ - pid = INLINE_SYSCALL(getpid, 0); - - if (ENABLE_SSP_SMASH_DUMPS_CORE) { - static struct sigaction default_abort_act; - /* Remove any user-supplied handler for SIGABRT, before using it */ - default_abort_act.sa_handler = SIG_DFL; - default_abort_act.sa_sigaction = NULL; - __sigfillset(&default_abort_act.sa_mask); - default_abort_act.sa_flags = 0; - if (DO_SIGACTION(SIGABRT, &default_abort_act, NULL) == 0) - INLINE_SYSCALL(kill, 2, pid, SIGABRT); - } - - /* Note; actions cannot be added to SIGKILL */ - INLINE_SYSCALL(kill, 2, pid, SIGKILL); - - /* In case the kill didn't work, exit anyway - * The loop prevents gcc thinking this routine returns - */ - while (1) - INLINE_SYSCALL(exit, 0); -} - -__attribute__ ((__noreturn__)) -void __stack_chk_fail(void) -{ - __hardened_gentoo_stack_chk_fail(NULL, 0); -} - -#ifdef ENABLE_OLD_SSP_COMPAT -__attribute__ ((__noreturn__)) -void __stack_smash_handler(char func[], int damaged) -{ - __hardened_gentoo_stack_chk_fail(func, damaged); -} -#endif diff --git a/sys-libs/glibc/files/2.6/glibc-2.6-hardened-inittls-nosysenter.patch b/sys-libs/glibc/files/2.6/glibc-2.6-hardened-inittls-nosysenter.patch deleted file mode 100644 index be8ca196..00000000 --- a/sys-libs/glibc/files/2.6/glibc-2.6-hardened-inittls-nosysenter.patch +++ /dev/null @@ -1,273 +0,0 @@ -When building glibc PIE (which is not something upstream support), -several modifications are necessary to the glibc build process. - -First, any syscalls in PIEs must be of the PIC variant, otherwise -textrels ensue. Then, any syscalls made before the initialisation -of the TLS will fail on i386, as the sysenter variant on i386 uses -the TLS, giving rise to a chicken-and-egg situation. This patch -defines a PIC syscall variant that doesn't use sysenter, even when the sysenter -version is normally used, and uses the non-sysenter version for the brk -syscall that is performed by the TLS initialisation. Further, the TLS -initialisation is moved in this case prior to the initialisation of -dl_osversion, as that requires further syscalls. - -csu/libc-start.c: Move initial TLS initialization to before the -initialisation of dl_osversion, when INTERNAL_SYSCALL_NOSYSENTER is defined - -csu/libc-tls.c: Use the no-sysenter version of sbrk when -INTERNAL_SYSCALL_NOSYSENTER is defined. - -misc/sbrk.c: Define a no-sysenter version of sbrk, using the no-sysenter -version of brk - if INTERNAL_SYSCALL_NOSYSENTER is defined. - -misc/brk.c: Define a no-sysenter version of brk if -INTERNAL_SYSCALL_NOSYSENTER is defined. - -sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NOSYSENTER -Make INTERNAL_SYSCALL always use the PIC variant, even if not SHARED. - -Patch by Kevin F. Quinn <kevquinn@gentoo.org> - ---- csu/libc-start.c -+++ csu/libc-start.c -@@ -28,6 +28,7 @@ - extern int __libc_multiple_libcs; - - #include <tls.h> -+#include <sysdep.h> - #ifndef SHARED - # include <dl-osinfo.h> - extern void __pthread_initialize_minimal (void); -@@ -129,6 +130,11 @@ - # endif - _dl_aux_init (auxvec); - # endif -+# ifdef INTERNAL_SYSCALL_NOSYSENTER -+ /* Do the initial TLS initialization before _dl_osversion, -+ since the latter uses the uname syscall. */ -+ __pthread_initialize_minimal (); -+# endif - # ifdef DL_SYSDEP_OSCHECK - if (!__libc_multiple_libcs) - { -@@ -138,10 +144,12 @@ - } - # endif - -+# ifndef INTERNAL_SYSCALL_NOSYSENTER - /* Initialize the thread library at least a bit since the libgcc - functions are using thread functions if these are available and - we need to setup errno. */ - __pthread_initialize_minimal (); -+# endif - #endif - - # ifndef SHARED ---- csu/libc-tls.c -+++ csu/libc-tls.c -@@ -23,6 +23,7 @@ - #include <unistd.h> - #include <stdio.h> - #include <sys/param.h> -+#include <sysdep.h> - - - #ifdef SHARED -@@ -29,6 +30,9 @@ - #error makefile bug, this file is for static only - #endif - -+#ifdef INTERNAL_SYSCALL_NOSYSENTER -+extern void *__sbrk_nosysenter (intptr_t __delta); -+#endif - extern ElfW(Phdr) *_dl_phdr; - extern size_t _dl_phnum; - -@@ -141,14 +145,26 @@ - - The initialized value of _dl_tls_static_size is provided by dl-open.c - to request some surplus that permits dynamic loading of modules with -- IE-model TLS. */ -+ IE-model TLS. -+ -+ Where the normal sbrk would use a syscall that needs the TLS (i386) -+ use the special non-sysenter version instead. */ - #if TLS_TCB_AT_TP - tcb_offset = roundup (memsz + GL(dl_tls_static_size), tcbalign); -+# ifdef INTERNAL_SYSCALL_NOSYSENTER -+ tlsblock = __sbrk_nosysenter (tcb_offset + tcbsize + max_align); -+# else - tlsblock = __sbrk (tcb_offset + tcbsize + max_align); -+# endif - #elif TLS_DTV_AT_TP - tcb_offset = roundup (tcbsize, align ?: 1); -+# ifdef INTERNAL_SYSCALL_NOSYSENTER -+ tlsblock = __sbrk_nosysenter (tcb_offset + memsz + max_align -+ + TLS_PRE_TCB_SIZE + GL(dl_tls_static_size)); -+# else - tlsblock = __sbrk (tcb_offset + memsz + max_align - + TLS_PRE_TCB_SIZE + GL(dl_tls_static_size)); -+# endif - tlsblock += TLS_PRE_TCB_SIZE; - #else - /* In case a model with a different layout for the TCB and DTV ---- misc/sbrk.c -+++ misc/sbrk.c -@@ -18,6 +18,7 @@ - - #include <unistd.h> - #include <errno.h> -+#include <sysdep.h> - - /* Defined in brk.c. */ - extern void *__curbrk; -@@ -29,6 +30,35 @@ - /* Extend the process's data space by INCREMENT. - If INCREMENT is negative, shrink data space by - INCREMENT. - Return start of new space allocated, or -1 for errors. */ -+#ifdef INTERNAL_SYSCALL_NOSYSENTER -+/* This version is used by csu/libc-tls.c whem initialising the TLS -+ if the SYSENTER version requires the TLS (which it does on i386). -+ Obviously using the TLS before it is initialised is broken. */ -+extern int __brk_nosysenter (void *addr); -+void * -+__sbrk_nosysenter (intptr_t increment) -+{ -+ void *oldbrk; -+ -+ /* If this is not part of the dynamic library or the library is used -+ via dynamic loading in a statically linked program update -+ __curbrk from the kernel's brk value. That way two separate -+ instances of __brk and __sbrk can share the heap, returning -+ interleaved pieces of it. */ -+ if (__curbrk == NULL || __libc_multiple_libcs) -+ if (__brk_nosysenter (0) < 0) /* Initialize the break. */ -+ return (void *) -1; -+ -+ if (increment == 0) -+ return __curbrk; -+ -+ oldbrk = __curbrk; -+ if (__brk_nosysenter (oldbrk + increment) < 0) -+ return (void *) -1; -+ -+ return oldbrk; -+} -+#endif - void * - __sbrk (intptr_t increment) - { ---- sysdeps/unix/sysv/linux/i386/brk.c -+++ sysdeps/unix/sysv/linux/i386/brk.c -@@ -31,6 +31,30 @@ - linker. */ - weak_alias (__curbrk, ___brk_addr) - -+#ifdef INTERNAL_SYSCALL_NOSYSENTER -+/* This version is used by csu/libc-tls.c whem initialising the TLS -+ * if the SYSENTER version requires the TLS (which it does on i386). -+ * Obviously using the TLS before it is initialised is broken. */ -+int -+__brk_nosysenter (void *addr) -+{ -+ void *__unbounded newbrk; -+ -+ INTERNAL_SYSCALL_DECL (err); -+ newbrk = (void *__unbounded) INTERNAL_SYSCALL_NOSYSENTER (brk, err, 1, -+ __ptrvalue (addr)); -+ -+ __curbrk = newbrk; -+ -+ if (newbrk < addr) -+ { -+ __set_errno (ENOMEM); -+ return -1; -+ } -+ -+ return 0; -+} -+#endif - int - __brk (void *addr) - { ---- sysdeps/unix/sysv/linux/i386/sysdep.h -+++ sysdeps/unix/sysv/linux/i386/sysdep.h -@@ -187,7 +187,7 @@ - /* The original calling convention for system calls on Linux/i386 is - to use int $0x80. */ - #ifdef I386_USE_SYSENTER --# ifdef SHARED -+# if defined SHARED || defined __PIC__ - # define ENTER_KERNEL call *%gs:SYSINFO_OFFSET - # else - # define ENTER_KERNEL call *_dl_sysinfo -@@ -358,7 +358,7 @@ - possible to use more than four parameters. */ - #undef INTERNAL_SYSCALL - #ifdef I386_USE_SYSENTER --# ifdef SHARED -+# if defined SHARED || defined __PIC__ - # define INTERNAL_SYSCALL(name, err, nr, args...) \ - ({ \ - register unsigned int resultvar; \ -@@ -384,6 +384,18 @@ - : "0" (name), "i" (offsetof (tcbhead_t, sysinfo)) \ - ASMFMT_##nr(args) : "memory", "cc"); \ - (int) resultvar; }) -+# define INTERNAL_SYSCALL_NOSYSENTER(name, err, nr, args...) \ -+ ({ \ -+ register unsigned int resultvar; \ -+ EXTRAVAR_##nr \ -+ asm volatile ( \ -+ LOADARGS_NOSYSENTER_##nr \ -+ "movl %1, %%eax\n\t" \ -+ "int $0x80\n\t" \ -+ RESTOREARGS_NOSYSENTER_##nr \ -+ : "=a" (resultvar) \ -+ : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \ -+ (int) resultvar; }) - # else - # define INTERNAL_SYSCALL(name, err, nr, args...) \ - ({ \ -@@ -447,12 +459,20 @@ - - #define LOADARGS_0 - #ifdef __PIC__ --# if defined I386_USE_SYSENTER && defined SHARED -+# if defined I386_USE_SYSENTER && ( defined SHARED || defined __PIC__ ) - # define LOADARGS_1 \ - "bpushl .L__X'%k3, %k3\n\t" - # define LOADARGS_5 \ - "movl %%ebx, %4\n\t" \ - "movl %3, %%ebx\n\t" -+# define LOADARGS_NOSYSENTER_1 \ -+ "bpushl .L__X'%k2, %k2\n\t" -+# define LOADARGS_NOSYSENTER_2 LOADARGS_NOSYSENTER_1 -+# define LOADARGS_NOSYSENTER_3 LOADARGS_3 -+# define LOADARGS_NOSYSENTER_4 LOADARGS_3 -+# define LOADARGS_NOSYSENTER_5 \ -+ "movl %%ebx, %3\n\t" \ -+ "movl %2, %%ebx\n\t" - # else - # define LOADARGS_1 \ - "bpushl .L__X'%k2, %k2\n\t" -@@ -474,11 +495,18 @@ - - #define RESTOREARGS_0 - #ifdef __PIC__ --# if defined I386_USE_SYSENTER && defined SHARED -+# if defined I386_USE_SYSENTER && ( defined SHARED || defined __PIC__ ) - # define RESTOREARGS_1 \ - "bpopl .L__X'%k3, %k3\n\t" - # define RESTOREARGS_5 \ - "movl %4, %%ebx" -+# define RESTOREARGS_NOSYSENTER_1 \ -+ "bpopl .L__X'%k2, %k2\n\t" -+# define RESTOREARGS_NOSYSENTER_2 RESTOREARGS_NOSYSENTER_1 -+# define RESTOREARGS_NOSYSENTER_3 RESTOREARGS_3 -+# define RESTOREARGS_NOSYSENTER_4 RESTOREARGS_3 -+# define RESTOREARGS_NOSYSENTER_5 \ -+ "movl %3, %%ebx" - # else - # define RESTOREARGS_1 \ - "bpopl .L__X'%k2, %k2\n\t" diff --git a/sys-libs/glibc/files/2.7/glibc-2.7-hardened-inittls-nosysenter.patch b/sys-libs/glibc/files/2.7/glibc-2.7-hardened-inittls-nosysenter.patch deleted file mode 100644 index ecf57a91..00000000 --- a/sys-libs/glibc/files/2.7/glibc-2.7-hardened-inittls-nosysenter.patch +++ /dev/null @@ -1,273 +0,0 @@ -When building glibc PIE (which is not something upstream support), -several modifications are necessary to the glibc build process. - -First, any syscalls in PIEs must be of the PIC variant, otherwise -textrels ensue. Then, any syscalls made before the initialisation -of the TLS will fail on i386, as the sysenter variant on i386 uses -the TLS, giving rise to a chicken-and-egg situation. This patch -defines a PIC syscall variant that doesn't use sysenter, even when the sysenter -version is normally used, and uses the non-sysenter version for the brk -syscall that is performed by the TLS initialisation. Further, the TLS -initialisation is moved in this case prior to the initialisation of -dl_osversion, as that requires further syscalls. - -csu/libc-start.c: Move initial TLS initialization to before the -initialisation of dl_osversion, when INTERNAL_SYSCALL_NOSYSENTER is defined - -csu/libc-tls.c: Use the no-sysenter version of sbrk when -INTERNAL_SYSCALL_NOSYSENTER is defined. - -misc/sbrk.c: Define a no-sysenter version of sbrk, using the no-sysenter -version of brk - if INTERNAL_SYSCALL_NOSYSENTER is defined. - -misc/brk.c: Define a no-sysenter version of brk if -INTERNAL_SYSCALL_NOSYSENTER is defined. - -sysdeps/unix/sysv/linux/i386/sysdep.h: Define INTERNAL_SYSCALL_NOSYSENTER -Make INTERNAL_SYSCALL always use the PIC variant, even if not SHARED. - -Patch by Kevin F. Quinn <kevquinn@gentoo.org> - ---- csu/libc-start.c -+++ csu/libc-start.c -@@ -28,6 +28,7 @@ - extern int __libc_multiple_libcs; - - #include <tls.h> -+#include <sysdep.h> - #ifndef SHARED - # include <dl-osinfo.h> - extern void __pthread_initialize_minimal (void); -@@ -129,6 +130,11 @@ - # endif - _dl_aux_init (auxvec); - # endif -+# ifdef INTERNAL_SYSCALL_NOSYSENTER -+ /* Do the initial TLS initialization before _dl_osversion, -+ since the latter uses the uname syscall. */ -+ __pthread_initialize_minimal (); -+# endif - # ifdef DL_SYSDEP_OSCHECK - if (!__libc_multiple_libcs) - { -@@ -138,10 +144,12 @@ - } - # endif - -+# ifndef INTERNAL_SYSCALL_NOSYSENTER - /* Initialize the thread library at least a bit since the libgcc - functions are using thread functions if these are available and - we need to setup errno. */ - __pthread_initialize_minimal (); -+# endif - - /* Set up the stack checker's canary. */ - uintptr_t stack_chk_guard = _dl_setup_stack_chk_guard (); ---- csu/libc-tls.c -+++ csu/libc-tls.c -@@ -23,6 +23,7 @@ - #include <unistd.h> - #include <stdio.h> - #include <sys/param.h> -+#include <sysdep.h> - - - #ifdef SHARED -@@ -29,6 +30,9 @@ - #error makefile bug, this file is for static only - #endif - -+#ifdef INTERNAL_SYSCALL_NOSYSENTER -+extern void *__sbrk_nosysenter (intptr_t __delta); -+#endif - extern ElfW(Phdr) *_dl_phdr; - extern size_t _dl_phnum; - -@@ -141,14 +145,26 @@ - - The initialized value of _dl_tls_static_size is provided by dl-open.c - to request some surplus that permits dynamic loading of modules with -- IE-model TLS. */ -+ IE-model TLS. -+ -+ Where the normal sbrk would use a syscall that needs the TLS (i386) -+ use the special non-sysenter version instead. */ - #if TLS_TCB_AT_TP - tcb_offset = roundup (memsz + GL(dl_tls_static_size), tcbalign); -+# ifdef INTERNAL_SYSCALL_NOSYSENTER -+ tlsblock = __sbrk_nosysenter (tcb_offset + tcbsize + max_align); -+# else - tlsblock = __sbrk (tcb_offset + tcbsize + max_align); -+# endif - #elif TLS_DTV_AT_TP - tcb_offset = roundup (tcbsize, align ?: 1); -+# ifdef INTERNAL_SYSCALL_NOSYSENTER -+ tlsblock = __sbrk_nosysenter (tcb_offset + memsz + max_align -+ + TLS_PRE_TCB_SIZE + GL(dl_tls_static_size)); -+# else - tlsblock = __sbrk (tcb_offset + memsz + max_align - + TLS_PRE_TCB_SIZE + GL(dl_tls_static_size)); -+# endif - tlsblock += TLS_PRE_TCB_SIZE; - #else - /* In case a model with a different layout for the TCB and DTV ---- misc/sbrk.c -+++ misc/sbrk.c -@@ -18,6 +18,7 @@ - - #include <unistd.h> - #include <errno.h> -+#include <sysdep.h> - - /* Defined in brk.c. */ - extern void *__curbrk; -@@ -29,6 +30,35 @@ - /* Extend the process's data space by INCREMENT. - If INCREMENT is negative, shrink data space by - INCREMENT. - Return start of new space allocated, or -1 for errors. */ -+#ifdef INTERNAL_SYSCALL_NOSYSENTER -+/* This version is used by csu/libc-tls.c whem initialising the TLS -+ if the SYSENTER version requires the TLS (which it does on i386). -+ Obviously using the TLS before it is initialised is broken. */ -+extern int __brk_nosysenter (void *addr); -+void * -+__sbrk_nosysenter (intptr_t increment) -+{ -+ void *oldbrk; -+ -+ /* If this is not part of the dynamic library or the library is used -+ via dynamic loading in a statically linked program update -+ __curbrk from the kernel's brk value. That way two separate -+ instances of __brk and __sbrk can share the heap, returning -+ interleaved pieces of it. */ -+ if (__curbrk == NULL || __libc_multiple_libcs) -+ if (__brk_nosysenter (0) < 0) /* Initialize the break. */ -+ return (void *) -1; -+ -+ if (increment == 0) -+ return __curbrk; -+ -+ oldbrk = __curbrk; -+ if (__brk_nosysenter (oldbrk + increment) < 0) -+ return (void *) -1; -+ -+ return oldbrk; -+} -+#endif - void * - __sbrk (intptr_t increment) - { ---- sysdeps/unix/sysv/linux/i386/brk.c -+++ sysdeps/unix/sysv/linux/i386/brk.c -@@ -31,6 +31,30 @@ - linker. */ - weak_alias (__curbrk, ___brk_addr) - -+#ifdef INTERNAL_SYSCALL_NOSYSENTER -+/* This version is used by csu/libc-tls.c whem initialising the TLS -+ * if the SYSENTER version requires the TLS (which it does on i386). -+ * Obviously using the TLS before it is initialised is broken. */ -+int -+__brk_nosysenter (void *addr) -+{ -+ void *__unbounded newbrk; -+ -+ INTERNAL_SYSCALL_DECL (err); -+ newbrk = (void *__unbounded) INTERNAL_SYSCALL_NOSYSENTER (brk, err, 1, -+ __ptrvalue (addr)); -+ -+ __curbrk = newbrk; -+ -+ if (newbrk < addr) -+ { -+ __set_errno (ENOMEM); -+ return -1; -+ } -+ -+ return 0; -+} -+#endif - int - __brk (void *addr) - { ---- sysdeps/unix/sysv/linux/i386/sysdep.h -+++ sysdeps/unix/sysv/linux/i386/sysdep.h -@@ -187,7 +187,7 @@ - /* The original calling convention for system calls on Linux/i386 is - to use int $0x80. */ - #ifdef I386_USE_SYSENTER --# ifdef SHARED -+# if defined SHARED || defined __PIC__ - # define ENTER_KERNEL call *%gs:SYSINFO_OFFSET - # else - # define ENTER_KERNEL call *_dl_sysinfo -@@ -358,7 +358,7 @@ - possible to use more than four parameters. */ - #undef INTERNAL_SYSCALL - #ifdef I386_USE_SYSENTER --# ifdef SHARED -+# if defined SHARED || defined __PIC__ - # define INTERNAL_SYSCALL(name, err, nr, args...) \ - ({ \ - register unsigned int resultvar; \ -@@ -384,6 +384,18 @@ - : "0" (name), "i" (offsetof (tcbhead_t, sysinfo)) \ - ASMFMT_##nr(args) : "memory", "cc"); \ - (int) resultvar; }) -+# define INTERNAL_SYSCALL_NOSYSENTER(name, err, nr, args...) \ -+ ({ \ -+ register unsigned int resultvar; \ -+ EXTRAVAR_##nr \ -+ asm volatile ( \ -+ LOADARGS_NOSYSENTER_##nr \ -+ "movl %1, %%eax\n\t" \ -+ "int $0x80\n\t" \ -+ RESTOREARGS_NOSYSENTER_##nr \ -+ : "=a" (resultvar) \ -+ : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \ -+ (int) resultvar; }) - # else - # define INTERNAL_SYSCALL(name, err, nr, args...) \ - ({ \ -@@ -447,12 +459,20 @@ - - #define LOADARGS_0 - #ifdef __PIC__ --# if defined I386_USE_SYSENTER && defined SHARED -+# if defined I386_USE_SYSENTER && ( defined SHARED || defined __PIC__ ) - # define LOADARGS_1 \ - "bpushl .L__X'%k3, %k3\n\t" - # define LOADARGS_5 \ - "movl %%ebx, %4\n\t" \ - "movl %3, %%ebx\n\t" -+# define LOADARGS_NOSYSENTER_1 \ -+ "bpushl .L__X'%k2, %k2\n\t" -+# define LOADARGS_NOSYSENTER_2 LOADARGS_NOSYSENTER_1 -+# define LOADARGS_NOSYSENTER_3 LOADARGS_3 -+# define LOADARGS_NOSYSENTER_4 LOADARGS_3 -+# define LOADARGS_NOSYSENTER_5 \ -+ "movl %%ebx, %3\n\t" \ -+ "movl %2, %%ebx\n\t" - # else - # define LOADARGS_1 \ - "bpushl .L__X'%k2, %k2\n\t" -@@ -474,11 +495,18 @@ - - #define RESTOREARGS_0 - #ifdef __PIC__ --# if defined I386_USE_SYSENTER && defined SHARED -+# if defined I386_USE_SYSENTER && ( defined SHARED || defined __PIC__ ) - # define RESTOREARGS_1 \ - "bpopl .L__X'%k3, %k3\n\t" - # define RESTOREARGS_5 \ - "movl %4, %%ebx" -+# define RESTOREARGS_NOSYSENTER_1 \ -+ "bpopl .L__X'%k2, %k2\n\t" -+# define RESTOREARGS_NOSYSENTER_2 RESTOREARGS_NOSYSENTER_1 -+# define RESTOREARGS_NOSYSENTER_3 RESTOREARGS_3 -+# define RESTOREARGS_NOSYSENTER_4 RESTOREARGS_3 -+# define RESTOREARGS_NOSYSENTER_5 \ -+ "movl %3, %%ebx" - # else - # define RESTOREARGS_1 \ - "bpopl .L__X'%k2, %k2\n\t" diff --git a/sys-libs/glibc/files/eblits/common.eblit b/sys-libs/glibc/files/eblits/common.eblit deleted file mode 100644 index 6160c0fe..00000000 --- a/sys-libs/glibc/files/eblits/common.eblit +++ /dev/null @@ -1,288 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.9 2009/01/28 18:11:41 vapier Exp $ - -# We need to be able to set alternative headers for -# compiling for non-native platform -# Will also become useful for testing kernel-headers without screwing up -# the whole system. -# note: intentionally undocumented. -alt_headers() { - if [[ -z ${ALT_HEADERS} ]] ; then - if is_crosscompile ; then - ALT_HEADERS="/usr/${CTARGET}/usr/include" - else - ALT_HEADERS="/usr/include" - fi - fi - echo "${ALT_HEADERS}" -} -alt_build_headers() { - if [[ -z ${ALT_BUILD_HEADERS} ]] ; then - ALT_BUILD_HEADERS=$(alt_headers) - if tc-is-cross-compiler ; then - ALT_BUILD_HEADERS=${ROOT}$(alt_headers) - if [[ ! -e ${ALT_BUILD_HEADERS}/linux/version.h ]] ; then - local header_path=$(echo '#include <linux/version.h>' | $(tc-getCPP ${CTARGET}) ${CFLAGS} 2>&1 | grep -o '[^"]*linux/version.h') - ALT_BUILD_HEADERS=${header_path%/linux/version.h} - fi - fi - fi - echo "${ALT_BUILD_HEADERS}" -} - -alt_usrlibdir() { - if is_crosscompile ; then - echo /usr/${CTARGET}/usr/$(get_libdir) - else - echo /usr/$(get_libdir) - fi -} - -setup_flags() { - # Make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then - CHOST=${CTARGET} strip-unsupported-flags - fi - - # Store our CFLAGS because it's changed depending on which CTARGET - # we are building when pulling glibc on a multilib profile - CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} - CFLAGS=${CFLAGS_BASE} - CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} - CXXFLAGS=${CXXFLAGS_BASE} - ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} - ASFLAGS=${ASFLAGS_BASE} - - # Over-zealous CFLAGS can often cause problems. What may work for one - # person may not work for another. To avoid a large influx of bugs - # relating to failed builds, we strip most CFLAGS out to ensure as few - # problems as possible. - strip-flags - strip-unsupported-flags - filter-flags -m32 -m64 -mabi=* - - unset CBUILD_OPT CTARGET_OPT - if has_multilib_profile ; then - CTARGET_OPT=$(get_abi_CTARGET) - [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) - fi - - case $(tc-arch) in - x86) - # -march needed for #185404 - local t=${CTARGET_OPT:-${CTARGET}} - t=${t%%-*} - if ! echo "" | $(tc-getCC) ${CFLAGS} -E -dD - | grep -qs __${t}__ ; then - filter-flags '-march=*' - export CFLAGS="-march=${t} ${CFLAGS}" - fi - ;; - amd64) - # Punt this when amd64's 2004.3 is removed - CFLAGS_x86="-m32" - - # -march needed for #185404 - local t=${CTARGET_OPT:-${CTARGET}} - t=${t%%-*} - if ! echo "" | $(tc-getCC) ${CFLAGS} ${CFLAGS_x86} -m32 -E -dD - | grep -qs __${t}__ ; then - filter-flags '-march=*' - export CFLAGS_x86="${CFLAGS_x86} -march=${t}" - fi - ;; - ppc) - append-flags "-freorder-blocks" - ;; - sparc) - # Both sparc and sparc64 can use -fcall-used-g6. -g7 is bad, though. - filter-flags "-fcall-used-g7" - append-flags "-fcall-used-g6" - filter-flags "-mvis" - - GLIBCMAJOR=$(get_version_component_range 1 ${PV}) - GLIBCMINOR=$(get_version_component_range 2 ${PV}) - - # set CTARGET_OPT so glibc can use cpu-specific .S files for better performance - # - UltraSPARC T1 (niagara) support requires >= glibc 2.8 - # - UltraSPARC T2 (niagara2) support requires >= glibc 2.7 - - if is_crosscompile || [[ ${PROFILE_ARCH} == "sparc64" ]] || { has_multilib_profile && ! tc-is-cross-compiler; } ; then - case ${ABI} in - sparc64) - filter-flags -Wa,-xarch -Wa,-A - - if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then - CTARGET_OPT="sparc64v2-unknown-linux-gnu" - append-flags "-Wa,-xarch=v9b" - export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" - elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then - CTARGET_OPT="sparc64v-unknown-linux-gnu" - append-flags "-Wa,-xarch=v9b" - export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" - elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then - CTARGET_OPT="sparc64b-unknown-linux-gnu" - append-flags "-Wa,-xarch=v9b" - export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9b" - else - CTARGET_OPT="sparc64-unknown-linux-gnu" - append-flags "-Wa,-xarch=v9a" - export ASFLAGS="${ASFLAGS} -Wa,-xarch=v9a" - fi - ;; - *) - if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then - CTARGET_OPT="sparcv9v2-unknown-linux-gnu" - elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then - CTARGET_OPT="sparcv9v-unknown-linux-gnu" - elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then - CTARGET_OPT="sparcv9b-unknown-linux-gnu" - else - CTARGET_OPT="sparcv9-unknown-linux-gnu" - fi - ;; - esac - else - if is-flagq "-mcpu=niagara2" && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.7 ]] ; then - CTARGET_OPT="sparcv9v2-unknown-linux-gnu" - elif { is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2" ; } && [[ ${GLIBCMAJOR}.${GLIBCMINOR} > 2.6 ]] ; then - CTARGET_OPT="sparcv9v-unknown-linux-gnu" - elif is-flagq "-mcpu=ultrasparc3" || is-flagq "-mcpu=niagara" || is-flagq "-mcpu=niagara2"; then - CTARGET_OPT="sparcv9b-unknown-linux-gnu" - elif { is_crosscompile && want_nptl; } || is-flagq "-mcpu=ultrasparc2" || is-flagq "-mcpu=ultrasparc"; then - CTARGET_OPT="sparcv9-unknown-linux-gnu" - fi - fi - ;; - esac - - if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then - CBUILD_OPT=${CTARGET_OPT} - fi - - # Lock glibc at -O2 -- linuxthreads needs it and we want to be - # conservative here. -fno-strict-aliasing is to work around #155906 - filter-flags -O? - append-flags -O2 -fno-strict-aliasing - - # Cant build glibc itself with fortify code - append-cppflags -U_FORTIFY_SOURCE - - # building glibc with SSP is fraught with difficulty, especially - # due to __stack_chk_fail_local which would mean significant changes - # to the glibc build process. See bug #94325 - filter-flags -fstack-protector - - if use hardened && gcc-specs-pie ; then - # Force PIC macro definition for all compilations since they're all - # either -fPIC or -fPIE with the default-PIE compiler. - append-cppflags -DPIC - else - # Don't build -fPIE without the default-PIE compiler and the - # hardened-pie patch - filter-flags -fPIE - fi -} - -want_nptl() { - [[ -z ${LT_VER} ]] && return 0 - want_tls || return 1 - use nptl || return 1 - - # Only list the arches that cannot do NPTL - case $(tc-arch) in - m68k) return 1;; - sparc) - # >= v9 is needed for nptl. - [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 - ;; - esac - - return 0 -} - -want_linuxthreads() { - [[ -z ${LT_VER} ]] && return 1 - ! use nptlonly && return 0 - want_nptl || return 0 - return 1 -} - -want_tls() { - # Archs that can use TLS (Thread Local Storage) - case $(tc-arch) in - sparc) - # 2.3.6 should have tls support on sparc64 - # when using newer binutils - case ${CTARGET/-*} in - sparc64*) return 1 ;; - *) return 0 ;; - esac - ;; - x86) - # requires i486 or better #106556 - [[ ${CTARGET} == i[4567]86* ]] && return 0 - return 1 - ;; - esac - - return 0 -} - -want__thread() { - want_tls || return 1 - - # For some reason --with-tls --with__thread is causing segfaults on sparc32. - [[ ${PROFILE_ARCH} == "sparc" ]] && return 1 - - [[ -n ${WANT__THREAD} ]] && return ${WANT__THREAD} - - echo 'extern __thread int i;' > "${T}"/test-__thread.c - $(tc-getCC ${CTARGET}) -c "${T}"/test-__thread.c -o "${T}"/test-__thread.o &> /dev/null - WANT__THREAD=$? - rm -f "${T}"/test-__thread.[co] - - return ${WANT__THREAD} -} - -use_multilib() { - case ${CTARGET} in - sparc*|mips64*|x86_64*|powerpc64*|s390x*) - has_multilib_profile || use multilib ;; - *) false ;; - esac -} - -# Setup toolchain variables that would be defined in the profiles for these archs. -setup_env() { - # silly users - unset LD_RUN_PATH - - if is_crosscompile || tc-is-cross-compiler ; then - multilib_env ${CTARGET} - if ! use multilib ; then - MULTILIB_ABIS=${DEFAULT_ABI} - else - MULTILIB_ABIS=${MULTILIB_ABIS:-${DEFAULT_ABI}} - fi - - # If the user has CFLAGS_<CTARGET> in their make.conf, use that, - # and fall back on CFLAGS. - local VAR=CFLAGS_${CTARGET//[-.]/_} - CFLAGS=${!VAR-${CFLAGS}} - fi - - setup_flags - - export ABI=${ABI:-${DEFAULT_ABI:-default}} - - if is_crosscompile || tc-is-cross-compiler ; then - local VAR=CFLAGS_${ABI} - # We need to export CFLAGS with abi information in them because - # glibc's configure script checks CFLAGS for some targets (like mips) - export CFLAGS="${!VAR} ${CFLAGS}" - fi -} - -just_headers() { - is_crosscompile && use crosscompile_opts_headers-only -} diff --git a/sys-libs/glibc/files/eblits/pkg_postinst.eblit b/sys-libs/glibc/files/eblits/pkg_postinst.eblit deleted file mode 100644 index 2566eed3..00000000 --- a/sys-libs/glibc/files/eblits/pkg_postinst.eblit +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_postinst.eblit,v 1.1 2009/03/01 21:06:22 vapier Exp $ - -eblit-glibc-pkg_postinst() { - # nothing to do if just installing headers - just_headers && return - - if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then - # Generate fastloading iconv module configuration file. - "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" - fi - - if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then - # Reload init ... if in a chroot or a diff init package, ignore - # errors from this step #253697 - /sbin/telinit U 2>/dev/null - - # if the host locales.gen contains no entries, we'll install everything - local locale_list="${ROOT}etc/locale.gen" - if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then - ewarn "Generating all locales; edit /etc/locale.gen to save time/space" - locale_list="${ROOT}usr/share/i18n/SUPPORTED" - fi - local x jobs - for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done - locale-gen -j ${jobs:-1} --config "${locale_list}" - fi -} diff --git a/sys-libs/glibc/files/eblits/pkg_preinst.eblit b/sys-libs/glibc/files/eblits/pkg_preinst.eblit deleted file mode 100644 index dcc5d9b1..00000000 --- a/sys-libs/glibc/files/eblits/pkg_preinst.eblit +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_preinst.eblit,v 1.1 2009/03/01 21:06:22 vapier Exp $ - -fix_lib64_symlinks() { - # the original Gentoo/AMD64 devs decided that since 64bit is the native - # bitdepth for AMD64, lib should be used for 64bit libraries. however, - # this ignores the FHS and breaks multilib horribly... especially - # since it wont even work without a lib64 symlink anyways. *rolls eyes* - # see bug 59710 for more information. - # Travis Tilley <lv@gentoo.org> (08 Aug 2004) - if [ -L ${ROOT}/lib64 ] ; then - ewarn "removing /lib64 symlink and moving lib to lib64..." - ewarn "dont hit ctrl-c until this is done" - rm ${ROOT}/lib64 - # now that lib64 is gone, nothing will run without calling ld.so - # directly. luckily the window of brokenness is almost non-existant - use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64 - use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64 - # all better :) - ldconfig - ln -s lib64 ${ROOT}/lib - einfo "done! :-)" - einfo "fixed broken lib64/lib symlink in ${ROOT}" - fi - if [ -L ${ROOT}/usr/lib64 ] ; then - rm ${ROOT}/usr/lib64 - mv ${ROOT}/usr/lib ${ROOT}/usr/lib64 - ln -s lib64 ${ROOT}/usr/lib - einfo "fixed broken lib64/lib symlink in ${ROOT}/usr" - fi - if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then - rm ${ROOT}/usr/X11R6/lib64 - mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64 - ln -s lib64 ${ROOT}/usr/X11R6/lib - einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6" - fi -} - -eblit-glibc-pkg_preinst() { - # nothing to do if just installing headers - just_headers && return - - # PPC64+others may want to eventually be added to this logic if they - # decide to be multilib compatible and FHS compliant. note that this - # chunk of FHS compliance only applies to 64bit archs where 32bit - # compatibility is a major concern (not IA64, for example). - - # amd64's 2005.0 is the first amd64 profile to not need this code. - # 2005.0 is setup properly, and this is executed as part of the - # 2004.3 -> 2005.0 upgrade script. - # It can be removed after 2004.3 has been purged from portage. - { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks - - # it appears that /lib/tls is sometimes not removed. See bug - # 69258 for more info. - if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && [[ ! -d ${D}/$(alt_libdir)/tls ]] ; then - ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..." - rm -r "${ROOT}"/$(alt_libdir)/tls || die - fi - - # simple test to make sure our new glibc isnt completely broken. - # make sure we don't test with statically built binaries since - # they will fail. also, skip if this glibc is a cross compiler. - [[ ${ROOT} != "/" ]] && return 0 - [[ -d ${D}/$(get_libdir) ]] || return 0 - cd / #228809 - local x striptest - for x in date env ls true uname ; do - x=$(type -p ${x}) - [[ -z ${x} ]] && continue - striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) - [[ -z ${striptest} ]] && continue - [[ ${striptest} == *"statically linked"* ]] && continue - "${D}"/$(get_libdir)/ld-*.so \ - --library-path "${D}"/$(get_libdir) \ - ${x} > /dev/null \ - || die "simple run test (${x}) failed" - done -} diff --git a/sys-libs/glibc/files/eblits/pkg_setup.eblit b/sys-libs/glibc/files/eblits/pkg_setup.eblit deleted file mode 100644 index 35b47478..00000000 --- a/sys-libs/glibc/files/eblits/pkg_setup.eblit +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/pkg_setup.eblit,v 1.3 2009/03/23 18:48:48 vapier Exp $ - -eblit-glibc-pkg_setup() { - # prevent native builds from downgrading ... maybe update to allow people - # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2) - if [[ ${ROOT} == "/" ]] && [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then - if has_version '>'${CATEGORY}/${PF} ; then - eerror "Sanity check to keep you from breaking your system:" - eerror " Downgrading glibc is not supported and a sure way to destruction" - die "aborting to save your system" - fi - - # Check for broken kernels #262698 - cd "${T}" - printf '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n' > kern-clo-test.c - emake kern-clo-test || die - if ! ./kern-clo-test ; then - eerror "Your patched vendor kernel is broken. You need to get an" - eerror "update from whoever is providing the kernel to you." - eerror "http://sourceware.org/bugzilla/show_bug.cgi?id=5227" - die "keeping your system alive, say thank you" - fi - fi - - # users have had a chance to phase themselves, time to give em the boot - if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then - eerror "You still haven't deleted ${ROOT}/etc/locales.build." - eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher." - die "lazy upgrader detected" - fi - - if [[ ${CTARGET} == i386-* ]] ; then - eerror "i386 CHOSTs are no longer supported." - eerror "Chances are you don't actually want/need i386." - eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml" - die "please fix your CHOST" - fi - - if [[ -n ${LT_VER} ]] ; then - if use nptlonly && ! use nptl ; then - eerror "If you want nptlonly, add nptl to your USE too ;p" - die "nptlonly without nptl" - fi - fi - - if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then - ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." - ewarn "This will result in a 50% performance penalty when running with a 32bit" - ewarn "hypervisor, which is probably not what you want." - fi - - use hardened && ! gcc-specs-pie && \ - ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" -} diff --git a/sys-libs/glibc/files/eblits/src_compile.eblit b/sys-libs/glibc/files/eblits/src_compile.eblit deleted file mode 100644 index b4d0318a..00000000 --- a/sys-libs/glibc/files/eblits/src_compile.eblit +++ /dev/null @@ -1,189 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_compile.eblit,v 1.7 2009/05/02 02:38:25 halcy0n Exp $ - -glibc_do_configure() { - local myconf - - # set addons - pushd "${S}" > /dev/null - local ADDONS=$(echo */configure | sed \ - -e 's:/configure::g' \ - -e 's:\(linuxthreads\|nptl\|rtkaio\|glibc-compat\)\( \|$\)::g' \ - -e 's: \+$::' \ - -e 's! !,!g' \ - -e 's!^!,!' \ - -e '/^,\*$/d') - [[ -d ports ]] && ADDONS="${ADDONS},ports" - popd > /dev/null - - use nls || myconf="${myconf} --disable-nls" - myconf="${myconf} $(use_enable hardened stackguard-randomization)" - if [[ $(<"${T}"/.ssp.compat) == "yes" ]] ; then - myconf="${myconf} --enable-old-ssp-compat" - else - myconf="${myconf} --disable-old-ssp-compat" - fi - - use glibc-omitfp && myconf="${myconf} --enable-omitfp" - - [[ ${CTARGET//_/-} == *-softfloat-* ]] && myconf="${myconf} --without-fp" - - if [[ $1 == "linuxthreads" ]] ; then - if want_tls ; then - myconf="${myconf} --with-tls" - - if ! want__thread || use glibc-compat20 || [[ ${LT_KER_VER} == 2.[02].* ]] ; then - myconf="${myconf} --without-__thread" - else - myconf="${myconf} --with-__thread" - fi - else - myconf="${myconf} --without-tls --without-__thread" - fi - - myconf="${myconf} --disable-sanity-checks" - myconf="${myconf} --enable-add-ons=linuxthreads${ADDONS}" - myconf="${myconf} --enable-kernel=${LT_KER_VER}" - elif [[ $1 == "nptl" ]] ; then - myconf="${myconf} --enable-add-ons=nptl${ADDONS}" - myconf="${myconf} --enable-kernel=${NPTL_KERN_VER}" - else - die "invalid pthread option" - fi - - # Since SELinux support is only required for nscd, only enable it if: - # 1. USE selinux - # 2. only for the primary ABI on multilib systems - # 3. Not a crosscompile - if ! is_crosscompile && use selinux ; then - if use multilib || has_multilib_profile ; then - if is_final_abi ; then - myconf="${myconf} --with-selinux" - else - myconf="${myconf} --without-selinux" - fi - else - myconf="${myconf} --with-selinux" - fi - else - myconf="${myconf} --without-selinux" - fi - - myconf="${myconf} - --without-cvs - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - $(use_enable profile) - $(use_with gd) - --with-headers=$(alt_build_headers) - --prefix=/usr - --libdir=/usr/$(get_libdir) - --mandir=/usr/share/man - --infodir=/usr/share/info - --libexecdir=/usr/$(get_libdir)/misc/glibc - ${EXTRA_ECONF}" - - # There is no configure option for this and we need to export it - # since the glibc build will re-run configure on itself - export libc_cv_slibdir=/$(get_libdir) - - has_version app-admin/eselect-compiler || export CC=$(tc-getCC ${CTARGET}) - - local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-$1 - mkdir -p "${GBUILDDIR}" - cd "${GBUILDDIR}" - einfo "Configuring GLIBC for $1 with: ${myconf// /\n\t\t}" - "${S}"/configure ${myconf} || die "failed to configure glibc" - - # since we'll be punting them for cross-compilers, and they can cause - # problems (ia64+static), we'll just skip building altogether - is_crosscompile && sed -i '1ibuild-programs = no' config.make -} - -toolchain-glibc_src_compile() { - echo - local v - for v in ABI CBUILD CHOST CTARGET CBUILD_OPT CTARGET_OPT CC CFLAGS ; do - einfo " $(printf '%15s' ${v}:) ${!v}" - done - echo - - if want_linuxthreads ; then - glibc_do_configure linuxthreads - einfo "Building GLIBC with linuxthreads..." - make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed" - fi - if want_nptl ; then - # ... and then do the optional nptl build - unset LD_ASSUME_KERNEL - glibc_do_configure nptl - einfo "Building GLIBC with NPTL..." - make PARALLELMFLAGS="${MAKEOPTS}" || die "make for ${ABI} failed" - fi -} - -toolchain-glibc_headers_compile() { - local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers - mkdir -p "${GBUILDDIR}" - cd "${GBUILDDIR}" - - # if we don't have a compiler yet, we cant really test it now - export \ - libc_cv_mlong_double_128=yes \ - libc_cv_mlong_double_128ibm=yes \ - libc_cv_ppc_machine=yes - - # Pick out the correct location for build headers - local ports="" myconf="--disable-sanity-checks --enable-hacker-mode" - [[ -d ${S}/ports ]] && ports=",ports" - myconf="${myconf} - --enable-add-ons=nptl${ports} - --without-cvs - --enable-bind-now - --build=${CBUILD_OPT:-${CBUILD}} - --host=${CTARGET_OPT:-${CTARGET}} - --with-headers=$(alt_build_headers) - --prefix=/usr - ${EXTRA_ECONF}" - - # Nothing is compiled here which would affect the headers for the target. - # so forcing CC/CFLAGS is sane. unless you dont have `gcc`. then i - # dont care :p. - einfo "Configuring GLIBC headers with: ${myconf// /\n\t\t}" - CC=gcc \ - CFLAGS="-O1 -pipe" \ - "${S}"/configure ${myconf} || die "failed to configure glibc" -} - -eblit-glibc-src_compile() { - if just_headers ; then - toolchain-glibc_headers_compile - return - fi - - setup_env - - if [[ -z ${OABI} ]] ; then - local abilist="" - if has_multilib_profile ; then - abilist=$(get_install_abis) - einfo "Building multilib glibc for ABIs: ${abilist}" - elif is_crosscompile || tc-is-cross-compiler ; then - abilist=${DEFAULT_ABI} - fi - if [[ -n ${abilist} ]] ; then - OABI=${ABI} - for ABI in ${abilist} ; do - export ABI - src_compile - done - ABI=${OABI} - unset OABI - return 0 - fi - fi - - toolchain-glibc_src_compile -} diff --git a/sys-libs/glibc/files/eblits/src_install-2.6.eblit b/sys-libs/glibc/files/eblits/src_install-2.6.eblit deleted file mode 100644 index 15bbf310..00000000 --- a/sys-libs/glibc/files/eblits/src_install-2.6.eblit +++ /dev/null @@ -1,250 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install-2.6.eblit,v 1.2 2008/06/29 16:39:23 vapier Exp $ - -toolchain-glibc_src_install() { - # These should not be set, else the - # zoneinfo do not always get installed ... - unset LANGUAGE LANG LC_ALL - - local GBUILDDIR - if want_linuxthreads ; then - GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads - else - GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl - fi - - local install_root=${D} - is_crosscompile && install_root="${install_root}/usr/${CTARGET}" - if want_linuxthreads ; then - cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads - einfo "Installing GLIBC ${ABI} with linuxthreads ..." - make PARALLELMFLAGS="${MAKEOPTS}" \ - install_root="${install_root}" \ - install || die - else # nptlonly - cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl - einfo "Installing GLIBC ${ABI} with NPTL ..." - make PARALLELMFLAGS="${MAKEOPTS}" \ - install_root="${install_root}" \ - install || die - fi - - if is_crosscompile ; then - # punt all the junk not needed by a cross-compiler - cd "${D}"/usr/${CTARGET} || die - rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc} - fi - - if want_linuxthreads && want_nptl ; then - einfo "Installing NPTL to $(alt_libdir)/tls/..." - cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl - dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl - - local l src_lib - for l in libc libm librt libpthread libthread_db ; do - # take care of shared lib first ... - l=${l}.so - if [[ -e ${l} ]] ; then - src_lib=${l} - else - src_lib=$(eval echo */${l}) - fi - cp -a ${src_lib} "${D}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}" - fperms a+rx $(alt_libdir)/tls/${l} - dosym ${l} $(alt_libdir)/tls/$(scanelf -qSF'%S#F' ${src_lib}) - - # then grab the linker script or the symlink ... - if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then - dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l} - else - sed \ - -e "s:/${l}:/tls/${l}:g" \ - -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \ - "${D}"$(alt_usrlibdir)/${l} > "${D}"$(alt_usrlibdir)/nptl/${l} - fi - - # then grab the static lib ... - src_lib=${src_lib/%.so/.a} - [[ ! -e ${src_lib} ]] && src_lib=${src_lib/%.a/_pic.a} - cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" - src_lib=${src_lib/%.a/_nonshared.a} - if [[ -e ${src_lib} ]] ; then - cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" - fi - done - - # use the nptl linker instead of the linuxthreads one as the linuxthreads - # one may lack TLS support and that can be really bad for business - cp -a elf/ld.so "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" - fi - - # We'll take care of the cache ourselves - rm -f "${D}"/etc/ld.so.cache - - # Some things want this, notably ash. - dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a - - # Handle includes for different ABIs - prep_ml_includes $(alt_headers) - - # When cross-compiling for a non-multilib setup, make sure we have - # lib and a proper symlink setup - if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then - cd "${D}"$(alt_libdir)/.. - mv $(get_libdir) lib || die - ln -s lib $(get_libdir) || die - cd "${D}"$(alt_usrlibdir)/.. - mv $(get_libdir) lib || die - ln -s lib $(get_libdir) || die - fi - - ################################################################# - # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # - # Make sure we install some symlink hacks so that when we build - # a 2nd stage cross-compiler, gcc finds the target system - # headers correctly. See gcc/doc/gccinstall.info - if is_crosscompile ; then - dosym usr/include /usr/${CTARGET}/sys-include - return 0 - fi - - # Everything past this point just needs to be done once ... - is_final_abi || return 0 - - # Make sure the non-native interp can be found on multilib systems - if has_multilib_profile ; then - case $(tc-arch) in - amd64) - [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib - dosym ../$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2 - ;; - ppc64) - [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib - dosym ../$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1 - ;; - esac - fi - - # Files for Debian-style locale updating - dodir /usr/share/i18n - sed \ - -e "/^#/d" \ - -e "/SUPPORTED-LOCALES=/d" \ - -e "s: \\\\::g" -e "s:/: :g" \ - "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \ - || die "generating /usr/share/i18n/SUPPORTED failed" - cd "${WORKDIR}"/extra/locale - dosbin locale-gen || die - doman *.[0-8] - insinto /etc - doins locale.gen || die - - # Make sure all the ABI's can find the locales and so we only - # have to generate one set - local a - keepdir /usr/$(get_libdir)/locale - for a in $(get_install_abis) ; do - if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then - dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale - fi - done - - if ! has noinfo ${FEATURES} && [[ -n ${INFOPAGE_VER} ]] ; then - einfo "Installing info pages..." - - make \ - -C "${GBUILDDIR}" \ - PARALLELMFLAGS="${MAKEOPTS}" \ - install_root="${install_root}" \ - info -i || die - fi - - if [[ -n ${MANPAGE_VER} ]] ; then - einfo "Installing man pages..." - - # Install linuxthreads man pages even if nptl is enabled - cd "${WORKDIR}"/man - doman *.3thr - fi - - cd "${S}" - - # Install misc network config files - insinto /etc - doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf || die - doins "${WORKDIR}"/extra/etc/*.conf || die - doinitd "${WORKDIR}"/extra/etc/nscd || die - - dodoc BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* - - # Prevent overwriting of the /etc/localtime symlink. We'll handle the - # creation of the "factory" symlink in pkg_postinst(). - rm -f "${D}"/etc/localtime -} - -toolchain-glibc_headers_install() { - local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers - cd "${GBUILDDIR}" - make install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed" - # Copy over headers that are not part of install-headers ... these - # are pretty much taken verbatim from crosstool, see it for more details - insinto $(alt_headers)/bits - doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits" - insinto $(alt_headers)/gnu - doins "${S}"/include/gnu/stubs.h || die "doins include gnu" - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - dosym usr/include /usr/${CTARGET}/sys-include -} - -src_strip() { - # gdb is lame and requires some debugging information to remain in - # libpthread, so we need to strip it by hand. libthread_db makes no - # sense stripped as it is only used when debugging. - local pthread=$(hasq splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}") - env \ - -uRESTRICT \ - CHOST=${CTARGET} \ - STRIP_MASK="/*/{,tls/}${pthread}*" \ - prepallstrip - # if user has stripping enabled and does not have split debug turned on, - # then leave the debugging sections in libpthread. - if ! hasq nostrip ${FEATURES} && ! hasq splitdebug ${FEATURES} ; then - ${STRIP:-${CTARGET}-strip} --strip-debug "${D}"/*/libpthread-*.so - fi -} - -eblit-glibc-src_install() { - if just_headers ; then - toolchain-glibc_headers_install - return - fi - - setup_env - - if [[ -z ${OABI} ]] ; then - local abilist="" - if has_multilib_profile ; then - abilist=$(get_install_abis) - einfo "Installing multilib glibc for ABIs: ${abilist}" - elif is_crosscompile || tc-is-cross-compiler ; then - abilist=${DEFAULT_ABI} - fi - if [[ -n ${abilist} ]] ; then - OABI=${ABI} - for ABI in ${abilist} ; do - export ABI - eblit-glibc-src_install - done - ABI=${OABI} - unset OABI - src_strip - return 0 - fi - fi - - toolchain-glibc_src_install - [[ -z ${OABI} ]] && src_strip -} diff --git a/sys-libs/glibc/files/eblits/src_install.eblit b/sys-libs/glibc/files/eblits/src_install.eblit deleted file mode 100644 index aa1d4e7a..00000000 --- a/sys-libs/glibc/files/eblits/src_install.eblit +++ /dev/null @@ -1,247 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_install.eblit,v 1.7 2008/12/29 09:22:45 vapier Exp $ - -toolchain-glibc_src_install() { - local GBUILDDIR - if want_linuxthreads ; then - GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-linuxthreads - else - GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-nptl - fi - - local install_root=${D} - is_crosscompile && install_root="${install_root}/usr/${CTARGET}" - if want_linuxthreads ; then - cd "${WORKDIR}"/build-${ABI}-${CTARGET}-linuxthreads - einfo "Installing GLIBC ${ABI} with linuxthreads ..." - else # nptlonly - cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl - einfo "Installing GLIBC ${ABI} with NPTL ..." - fi - make PARALLELMFLAGS="${MAKEOPTS}" \ - install_root="${install_root}" \ - install || die - - if is_crosscompile ; then - # punt all the junk not needed by a cross-compiler - cd "${D}"/usr/${CTARGET} || die - rm -rf ./{,usr/}{bin,etc,sbin,share} ./{,usr/}*/{gconv,misc} - fi - - if want_linuxthreads && want_nptl ; then - einfo "Installing NPTL to $(alt_libdir)/tls/..." - cd "${WORKDIR}"/build-${ABI}-${CTARGET}-nptl - dodir $(alt_libdir)/tls $(alt_usrlibdir)/nptl - - local l src_lib - for l in libc libm librt libpthread libthread_db ; do - # take care of shared lib first ... - l=${l}.so - if [[ -e ${l} ]] ; then - src_lib=${l} - else - src_lib=$(eval echo */${l}) - fi - cp -a ${src_lib} "${D}"$(alt_libdir)/tls/${l} || die "copying nptl ${l}" - fperms a+rx $(alt_libdir)/tls/${l} - dosym ${l} $(alt_libdir)/tls/$(scanelf -qSF'%S#F' ${src_lib}) - - # then grab the linker script or the symlink ... - if [[ -L ${D}$(alt_usrlibdir)/${l} ]] ; then - dosym $(alt_libdir)/tls/${l} $(alt_usrlibdir)/nptl/${l} - else - sed \ - -e "s:/${l}:/tls/${l}:g" \ - -e "s:/${l/%.so/_nonshared.a}:/nptl/${l/%.so/_nonshared.a}:g" \ - "${D}"$(alt_usrlibdir)/${l} > "${D}"$(alt_usrlibdir)/nptl/${l} - fi - - # then grab the static lib ... - src_lib=${src_lib/%.so/.a} - [[ ! -e ${src_lib} ]] && src_lib=${src_lib/%.a/_pic.a} - cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" - src_lib=${src_lib/%.a/_nonshared.a} - if [[ -e ${src_lib} ]] ; then - cp -a ${src_lib} "${D}"$(alt_usrlibdir)/nptl/ || die "copying nptl ${src_lib}" - fi - done - - # use the nptl linker instead of the linuxthreads one as the linuxthreads - # one may lack TLS support and that can be really bad for business - cp -a elf/ld.so "${D}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" - fi - - # We'll take care of the cache ourselves - rm -f "${D}"/etc/ld.so.cache - - # Some things want this, notably ash. - dosym libbsd-compat.a $(alt_usrlibdir)/libbsd.a - - # Handle includes for different ABIs if glibc itself doesn't do it - # XXX: curr glibc should finally handle all of them correctly - #case $(tc-arch) in - # amd64|mips|ppc|s390) ;; - # *) prep_ml_includes $(alt_headers) ;; - #esac - - # When cross-compiling for a non-multilib setup, make sure we have - # lib and a proper symlink setup - if is_crosscompile && ! use multilib && ! has_multilib_profile && [[ $(get_libdir) != "lib" ]] ; then - cd "${D}"$(alt_libdir)/.. - mv $(get_libdir) lib || die - ln -s lib $(get_libdir) || die - cd "${D}"$(alt_usrlibdir)/.. - mv $(get_libdir) lib || die - ln -s lib $(get_libdir) || die - fi - - ################################################################# - # EVERYTHING AFTER THIS POINT IS FOR NATIVE GLIBC INSTALLS ONLY # - # Make sure we install some symlink hacks so that when we build - # a 2nd stage cross-compiler, gcc finds the target system - # headers correctly. See gcc/doc/gccinstall.info - if is_crosscompile ; then - dosym usr/include /usr/${CTARGET}/sys-include - return 0 - fi - - # Everything past this point just needs to be done once ... - is_final_abi || return 0 - - # Make sure the non-native interp can be found on multilib systems - if has_multilib_profile ; then - case $(tc-arch) in - amd64) - [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR amd64) /lib - dosym ../$(get_abi_LIBDIR x86)/ld-linux.so.2 /lib/ld-linux.so.2 - ;; - ppc64) - [[ ! -e ${D}/lib ]] && dosym $(get_abi_LIBDIR ppc64) /lib - dosym ../$(get_abi_LIBDIR ppc)/ld.so.1 /lib/ld.so.1 - ;; - esac - fi - - # Files for Debian-style locale updating - dodir /usr/share/i18n - sed \ - -e "/^#/d" \ - -e "/SUPPORTED-LOCALES=/d" \ - -e "s: \\\\::g" -e "s:/: :g" \ - "${S}"/localedata/SUPPORTED > "${D}"/usr/share/i18n/SUPPORTED \ - || die "generating /usr/share/i18n/SUPPORTED failed" - cd "${WORKDIR}"/extra/locale - dosbin locale-gen || die - doman *.[0-8] - insinto /etc - doins locale.gen || die - - # Make sure all the ABI's can find the locales and so we only - # have to generate one set - local a - keepdir /usr/$(get_libdir)/locale - for a in $(get_install_abis) ; do - if [[ ! -e ${D}/usr/$(get_abi_LIBDIR ${a})/locale ]] ; then - dosym /usr/$(get_libdir)/locale /usr/$(get_abi_LIBDIR ${a})/locale - fi - done - - if ! has noinfo ${FEATURES} && [[ -n ${INFOPAGE_VER} ]] ; then - einfo "Installing info pages..." - - make \ - -C "${GBUILDDIR}" \ - PARALLELMFLAGS="${MAKEOPTS}" \ - install_root="${install_root}" \ - info -i || die - fi - - if [[ -n ${MANPAGE_VER} ]] ; then - einfo "Installing man pages..." - - # Install linuxthreads man pages even if nptl is enabled - cd "${WORKDIR}"/man - doman *.3thr - fi - - cd "${S}" - - # Install misc network config files - insinto /etc - doins nscd/nscd.conf posix/gai.conf nss/nsswitch.conf || die - doins "${WORKDIR}"/extra/etc/*.conf || die - doinitd "${WORKDIR}"/extra/etc/nscd || die - - dodoc BUGS ChangeLog* CONFORMANCE FAQ NEWS NOTES PROJECTS README* - - # Prevent overwriting of the /etc/localtime symlink. We'll handle the - # creation of the "factory" symlink in pkg_postinst(). - rm -f "${D}"/etc/localtime -} - -toolchain-glibc_headers_install() { - local GBUILDDIR=${WORKDIR}/build-${ABI}-${CTARGET}-headers - cd "${GBUILDDIR}" - make install_root="${D}/usr/${CTARGET}" install-headers || die "install-headers failed" - # Copy over headers that are not part of install-headers ... these - # are pretty much taken verbatim from crosstool, see it for more details - insinto $(alt_headers)/bits - doins misc/syscall-list.h bits/stdio_lim.h || die "doins include bits" - insinto $(alt_headers)/gnu - doins "${S}"/include/gnu/stubs.h || die "doins include gnu" - # Make sure we install the sys-include symlink so that when - # we build a 2nd stage cross-compiler, gcc finds the target - # system headers correctly. See gcc/doc/gccinstall.info - dosym usr/include /usr/${CTARGET}/sys-include -} - -src_strip() { - # gdb is lame and requires some debugging information to remain in - # libpthread, so we need to strip it by hand. libthread_db makes no - # sense stripped as it is only used when debugging. - local pthread=$(hasq splitdebug ${FEATURES} && echo "libthread_db" || echo "lib{pthread,thread_db}") - env \ - -uRESTRICT \ - CHOST=${CTARGET} \ - STRIP_MASK="/*/{,tls/}${pthread}*" \ - prepallstrip - # if user has stripping enabled and does not have split debug turned on, - # then leave the debugging sections in libpthread. - if ! hasq nostrip ${FEATURES} && ! hasq splitdebug ${FEATURES} ; then - ${STRIP:-${CTARGET}-strip} --strip-debug "${D}"/*/libpthread-*.so - fi -} - -eblit-glibc-src_install() { - if just_headers ; then - toolchain-glibc_headers_install - return - fi - - setup_env - - if [[ -z ${OABI} ]] ; then - local abilist="" - if has_multilib_profile ; then - abilist=$(get_install_abis) - einfo "Installing multilib glibc for ABIs: ${abilist}" - elif is_crosscompile || tc-is-cross-compiler ; then - abilist=${DEFAULT_ABI} - fi - if [[ -n ${abilist} ]] ; then - OABI=${ABI} - for ABI in ${abilist} ; do - export ABI - eblit-glibc-src_install - done - ABI=${OABI} - unset OABI - src_strip - return 0 - fi - fi - - toolchain-glibc_src_install - [[ -z ${OABI} ]] && src_strip -} diff --git a/sys-libs/glibc/files/eblits/src_test.eblit b/sys-libs/glibc/files/eblits/src_test.eblit deleted file mode 100644 index 0d733a35..00000000 --- a/sys-libs/glibc/files/eblits/src_test.eblit +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_test.eblit,v 1.3 2008/03/23 18:06:18 vapier Exp $ - -toolchain-glibc_src_test() { - cd "${WORKDIR}"/build-${ABI}-${CTARGET}-$1 || die "cd build-${ABI}-${CTARGET}-$1" - unset LD_ASSUME_KERNEL - make check && return 0 - einfo "make check failed - re-running with --keep-going to get the rest of the results" - make -k check - ewarn "make check failed for ${ABI}-${CTARGET}-$1" - return 1 -} - -eblit-glibc-src_test() { - local ret=0 - - setup_env - - # give tests more time to complete - export TIMEOUTFACTOR=5 - - if [[ -z ${OABI} ]] && has_multilib_profile ; then - OABI=${ABI} - einfo "Testing multilib glibc for ABIs: $(get_install_abis)" - for ABI in $(get_install_abis) ; do - export ABI - einfo " Testing ${ABI} glibc" - src_test - ((ret+=$?)) - done - ABI=${OABI} - unset OABI - [[ ${ret} -ne 0 ]] \ - && die "tests failed" \ - || return 0 - fi - - want_linuxthreads && toolchain-glibc_src_test linuxthreads ; ((ret+=$?)) - want_nptl && toolchain-glibc_src_test nptl ; ((ret+=$?)) - return ${ret} -} diff --git a/sys-libs/glibc/files/eblits/src_unpack.eblit b/sys-libs/glibc/files/eblits/src_unpack.eblit deleted file mode 100644 index 0935889b..00000000 --- a/sys-libs/glibc/files/eblits/src_unpack.eblit +++ /dev/null @@ -1,168 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/src_unpack.eblit,v 1.8 2009/05/17 22:17:56 vapier Exp $ - -int_to_KV() { - local version=$1 major minor micro - major=$((version / 65536)) - minor=$(((version % 65536) / 256)) - micro=$((version % 256)) - echo ${major}.${minor}.${micro} -} - -eend_KV() { - [[ $(KV_to_int $1) -ge $(KV_to_int $2) ]] - eend $? -} - -get_kheader_version() { - printf '#include <linux/version.h>\nLINUX_VERSION_CODE\n' | \ - $(tc-getCPP ${CTARGET}) -I "$(alt_build_headers)" | \ - tail -n 1 -} - -check_nptl_support() { - # don't care about the compiler here as we arent using it - just_headers && return - - local run_kv build_kv want_kv - run_kv=$(int_to_KV $(get_KV)) - build_kv=$(int_to_KV $(get_kheader_version)) - want_kv=${NPTL_KERN_VER} - - ebegin "Checking gcc for __thread support" - if ! eend $(want__thread ; echo $?) ; then - echo - eerror "Could not find a gcc that supports the __thread directive!" - eerror "Please update your binutils/gcc and try again." - die "No __thread support in gcc!" - fi - - if ! is_crosscompile && ! tc-is-cross-compiler ; then - # Building fails on an non-supporting kernel - ebegin "Checking kernel version (${run_kv} >= ${want_kv})" - if ! eend_KV ${run_kv} ${want_kv} ; then - echo - eerror "You need a kernel of at least ${want_kv} for NPTL support!" - die "Kernel version too low!" - fi - fi - - ebegin "Checking linux-headers version (${build_kv} >= ${want_kv})" - if ! eend_KV ${build_kv} ${want_kv} ; then - echo - eerror "You need linux-headers of at least ${want_kv} for NPTL support!" - die "linux-headers version too low!" - fi -} - -unpack_pkg() { - local a=${PN} - [[ -n ${SNAP_VER} ]] && a="${a}-${RELEASE_VER}" - [[ -n $1 ]] && a="${a}-$1" - [[ -n ${SNAP_VER} ]] && a="${a}-${SNAP_VER}" || a="${a}-${RELEASE_VER}" - unpack ${a}.tar.bz2 - [[ -n $1 ]] && mv ${a} $1 -} - -toolchain-glibc_src_unpack() { - # Check NPTL support _before_ we unpack things to save some time - want_nptl && check_nptl_support - - unpack_pkg - - cd "${S}" - touch locale/C-translit.h #185476 #218003 - [[ -n ${LT_VER} ]] && unpack_pkg linuxthreads ${LT_VER} - [[ -n ${PORTS_VER} ]] && unpack_pkg ports ${PORTS_VER} - [[ -n ${LIBIDN_VER} ]] && unpack_pkg libidn - - if [[ -n ${PATCH_VER} ]] ; then - cd "${WORKDIR}" - unpack glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 - # pull out all the addons - local d - for d in extra/*/configure ; do - d=${d%/configure} - [[ -d ${S}/${d} ]] && die "${d} already exists in \${S}" - mv "${d}" "${S}" || die "moving ${d} failed" - done - fi - - # XXX: We should do the branchupdate, before extracting the manpages and - # infopages else it does not help much (mtimes change if there is a change - # to them with branchupdate) - if [[ -n ${BRANCH_UPDATE} ]] ; then - cd "${S}" - epatch "${DISTDIR}"/glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 - - # Snapshot date patch - einfo "Patching version to display snapshot date ..." - sed -i -e "s:\(#define RELEASE\).*:\1 \"${BRANCH_UPDATE}\":" version.h - fi - - if [[ -n ${MANPAGE_VER} ]] ; then - cd "${WORKDIR}" - unpack glibc-manpages-${MANPAGE_VER}.tar.bz2 - fi - - if [[ -n ${INFOPAGE_VER} ]] ; then - cd "${S}" - unpack glibc-infopages-${INFOPAGE_VER}.tar.bz2 - fi - - # tag, glibc is it - cd "${S}" - [[ -e csu/Banner ]] && die "need new banner location" - [[ -n ${SNAP_VER} ]] && echo "Gentoo snapshot ${SNAP_VER}" >> csu/Banner - [[ -n ${BRANCH_UPDATE} ]] && echo "Gentoo branch ${BRANCH_UPDATE}" >> csu/Banner - if [[ -n ${PATCH_VER} ]] && ! use vanilla ; then - cd "${S}" - EPATCH_MULTI_MSG="Applying Gentoo Glibc Patchset ${RELEASE_VER}-${PATCH_VER} ..." \ - EPATCH_EXCLUDE=${GLIBC_PATCH_EXCLUDE} \ - EPATCH_SUFFIX="patch" \ - ARCH=$(tc-arch) \ - epatch "${WORKDIR}"/patches - echo "Gentoo patchset ${PATCH_VER}" >> csu/Banner - fi - - gnuconfig_update -} - -eblit-glibc-src_unpack() { - setup_env - - toolchain-glibc_src_unpack - - # Backwards SSP support - cd "${S}" -# For now, we force everyone to have the extra symbols -# einfon "Scanning system for __guard to see if we need SSP compat ... " -# if [[ -n $(scanelf -qyls__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then - echo "yes" > "${T}"/.ssp.compat -# else -# # ok, a quick scan didnt find it, so lets do a deep scan ... -# if [[ -n $(scanelf -qyRlps__guard -F'#s%F' | grep -v '^/lib.*/libc-2.*.so$') ]] ; then -# echo "yes" > "${T}"/.ssp.compat -# else -# echo "no" > "${T}"/.ssp.compat -# fi -# fi -# cat "${T}"/.ssp.compat - - # Glibc is stupid sometimes, and doesn't realize that with a - # static C-Only gcc, -lgcc_eh doesn't exist. - # http://sources.redhat.com/ml/libc-alpha/2003-09/msg00100.html - # http://sourceware.org/ml/libc-alpha/2005-02/msg00042.html - echo 'int main(){}' > "${T}"/gcc_eh_test.c - if ! $(tc-getCC ${CTARGET}) "${T}"/gcc_eh_test.c -lgcc_eh 2>/dev/null ; then - sed -i -e 's:-lgcc_eh::' Makeconfig || die "sed gcc_eh" - fi - - cd "${WORKDIR}" - find . -type f '(' -size 0 -o -name "*.orig" ')' -exec rm -f {} \; - find . -name configure -exec touch {} \; - - # Fix permissions on some of the scripts - chmod u+x "${S}"/scripts/*.sh -} diff --git a/sys-libs/glibc/files/fix-sysctl_h.patch b/sys-libs/glibc/files/fix-sysctl_h.patch deleted file mode 100644 index 2c490844..00000000 --- a/sys-libs/glibc/files/fix-sysctl_h.patch +++ /dev/null @@ -1,13 +0,0 @@ ---- linux.orig/include/linux/sysctl.h.orig 2003-05-18 22:12:39.000000000 +0200 -+++ linux.fixed/include/linux/sysctl.h 2003-05-18 22:13:58.000000000 +0200 -@@ -35,6 +35,10 @@ - the largest acceptable value for the nlen - member of a struct __sysctl_args to have? */ - -+#ifndef __user -+#define __user -+#endif -+ - struct __sysctl_args { - int __user *name; - int nlen; diff --git a/sys-libs/glibc/files/glibc-2.2.2-test-lfs-timeout.patch b/sys-libs/glibc/files/glibc-2.2.2-test-lfs-timeout.patch deleted file mode 100644 index ac4de72d..00000000 --- a/sys-libs/glibc/files/glibc-2.2.2-test-lfs-timeout.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- test-lfs.c~ Fri Feb 9 18:04:07 2001 -+++ test-lfs.c Sat Feb 17 04:30:18 2001 -@@ -34,7 +34,7 @@ - #define PREPARE do_prepare - - /* We might need a bit longer timeout. */ --#define TIMEOUT 20 /* sec */ -+#define TIMEOUT 120 /* sec */ - - /* This defines the `main' function and some more. */ - #include <test-skeleton.c> diff --git a/sys-libs/glibc/files/glibc-sec-hotfix-20040804.patch b/sys-libs/glibc/files/glibc-sec-hotfix-20040804.patch deleted file mode 100644 index 14ffd90b..00000000 --- a/sys-libs/glibc/files/glibc-sec-hotfix-20040804.patch +++ /dev/null @@ -1,128 +0,0 @@ -#! /bin/sh -e - -# All lines beginning with `# DP:' are a description of the patch. -# DP: Add grsecurity enhancements to glibc -# DP: * Adds Stefan Esser's unlink sanity check -# DP: * Removes LD_DEBUG for suid apps -# DP: * Fixes a glibc bug where certain envvars are interpreted -# DP: even if UNSECURE_ENVVARS says to drop them - -if [ $# -ne 2 ]; then - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -fi -case "$1" in - -patch) patch -d "$2" -f --no-backup-if-mismatch -p0 < $0;; - -unpatch) patch -d "$2" -f --no-backup-if-mismatch -R -p0 < $0;; - *) - echo >&2 "`basename $0`: script expects -patch|-unpatch as argument" - exit 1 -esac -exit 0 - ---- malloc/malloc.c 2004-08-03 18:06:35 -0400 -+++ malloc/malloc.c 2004-08-03 18:08:53 -0400 -@@ -311,6 +311,10 @@ - #define assert(x) ((void)0) - #endif - -+#include <abort-instr.h> -+#ifndef ABORT_INSTRUCTION -+#define ABORT_INSTRUCTION -+#endif - - /* - INTERNAL_SIZE_T is the word-size used for internal bookkeeping -@@ -1951,6 +1955,13 @@ - #define unlink(P, BK, FD) { \ - FD = P->fd; \ - BK = P->bk; \ -+ if (FD->bk != P || BK->fd != P) \ -+ { \ -+ ABORT_INSTRUCTION; \ -+ _exit(127); \ -+ while (1) \ -+ ABORT_INSTRUCTION; \ -+ } \ - FD->bk = BK; \ - BK->fd = FD; \ - } ---- sysdeps/generic/unsecvars.h 2004-08-03 18:13:13 -0400 -+++ sysdeps/generic/unsecvars.h 2004-08-03 18:11:41 -0400 -@@ -3,6 +3,8 @@ - with a '\0' explicitly. */ - #define UNSECURE_ENVVARS \ - "LD_PRELOAD\0" \ -+ "LD_DEBUG\0" \ -+ "LD_TRACE_PRELINKING\0" \ - "LD_LIBRARY_PATH\0" \ - "LD_ORIGIN_PATH\0" \ - "LD_DEBUG_OUTPUT\0" \ ---- elf/rtld.c 2003-01-07 13:47:35 -0500 -+++ elf/rtld.c 2004-08-03 22:15:51 -0400 -@@ -1762,6 +1762,30 @@ - GL(dl_profile_output) - = &"/var/tmp\0/var/profile"[INTUSE(__libc_enable_secure) ? 9 : 0]; - -+ /* Extra security for SUID binaries. Remove all dangerous environment -+ variables. */ -+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0)) -+ { -+ static const char unsecure_envvars[] = -+#ifdef EXTRA_UNSECURE_ENVVARS -+ EXTRA_UNSECURE_ENVVARS -+#endif -+ UNSECURE_ENVVARS; -+ const char *nextp; -+ -+ nextp = unsecure_envvars; -+ do -+ { -+ unsetenv (nextp); -+ /* We could use rawmemchr but this need not be fast. */ -+ nextp = (char *) (strchr) (nextp, '\0') + 1; -+ } -+ while (*nextp != '\0'); -+ -+ if (__access ("/etc/suid-debug", F_OK) != 0) -+ unsetenv ("MALLOC_CHECK_"); -+ } -+ - while ((envline = _dl_next_ld_env_entry (&runp)) != NULL) - { - size_t len = 0; -@@ -1897,33 +1921,10 @@ - /* The caller wants this information. */ - *modep = mode; - -- /* Extra security for SUID binaries. Remove all dangerous environment -- variables. */ -- if (__builtin_expect (INTUSE(__libc_enable_secure), 0)) -- { -- static const char unsecure_envvars[] = --#ifdef EXTRA_UNSECURE_ENVVARS -- EXTRA_UNSECURE_ENVVARS --#endif -- UNSECURE_ENVVARS; -- const char *nextp; -- -- nextp = unsecure_envvars; -- do -- { -- unsetenv (nextp); -- /* We could use rawmemchr but this need not be fast. */ -- nextp = (char *) (strchr) (nextp, '\0') + 1; -- } -- while (*nextp != '\0'); -- -- if (__access ("/etc/suid-debug", F_OK) != 0) -- unsetenv ("MALLOC_CHECK_"); -- } - /* If we have to run the dynamic linker in debugging mode and the - LD_DEBUG_OUTPUT environment variable is given, we write the debug - messages to this file. */ -- else if (any_debug && debug_output != NULL) -+ if (any_debug && debug_output != NULL) - { - #ifdef O_NOFOLLOW - const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW; diff --git a/sys-libs/glibc/files/glibc-sec-hotfix-20040916.patch b/sys-libs/glibc/files/glibc-sec-hotfix-20040916.patch deleted file mode 100644 index 3858a0f9..00000000 --- a/sys-libs/glibc/files/glibc-sec-hotfix-20040916.patch +++ /dev/null @@ -1,95 +0,0 @@ -diff -Nru glibc-2.3.3.old/elf/rtld.c glibc-2.3.3/elf/rtld.c ---- glibc-2.3.3.old/elf/rtld.c 2004-09-16 15:02:16.000000000 -0400 -+++ glibc-2.3.3/elf/rtld.c 2004-09-16 15:04:58.000000000 -0400 -@@ -2041,6 +2041,30 @@ - GLRO(dl_profile_output) - = &"/var/tmp\0/var/profile"[INTUSE(__libc_enable_secure) ? 9 : 0]; - -+ /* Extra security for SUID binaries. Remove all dangerous environment -+ variables. */ -+ if (__builtin_expect (INTUSE(__libc_enable_secure), 0)) -+ { -+ static const char unsecure_envvars[] = -+#ifdef EXTRA_UNSECURE_ENVVARS -+ EXTRA_UNSECURE_ENVVARS -+#endif -+ UNSECURE_ENVVARS; -+ const char *nextp; -+ -+ nextp = unsecure_envvars; -+ do -+ { -+ unsetenv (nextp); -+ /* We could use rawmemchr but this need not be fast. */ -+ nextp = (char *) (strchr) (nextp, '\0') + 1; -+ } -+ while (*nextp != '\0'); -+ -+ if (__access ("/etc/suid-debug", F_OK) != 0) -+ unsetenv ("MALLOC_CHECK_"); -+ } -+ - while ((envline = _dl_next_ld_env_entry (&runp)) != NULL) - { - size_t len = 0; -@@ -2188,33 +2212,10 @@ - /* The caller wants this information. */ - *modep = mode; - -- /* Extra security for SUID binaries. Remove all dangerous environment -- variables. */ -- if (__builtin_expect (INTUSE(__libc_enable_secure), 0)) -- { -- static const char unsecure_envvars[] = --#ifdef EXTRA_UNSECURE_ENVVARS -- EXTRA_UNSECURE_ENVVARS --#endif -- UNSECURE_ENVVARS; -- const char *nextp; -- -- nextp = unsecure_envvars; -- do -- { -- unsetenv (nextp); -- /* We could use rawmemchr but this need not be fast. */ -- nextp = (char *) (strchr) (nextp, '\0') + 1; -- } -- while (*nextp != '\0'); -- -- if (__access ("/etc/suid-debug", F_OK) != 0) -- unsetenv ("MALLOC_CHECK_"); -- } - /* If we have to run the dynamic linker in debugging mode and the - LD_DEBUG_OUTPUT environment variable is given, we write the debug - messages to this file. */ -- else if (any_debug && debug_output != NULL) -+ if (any_debug && debug_output != NULL) - { - #ifdef O_NOFOLLOW - const int flags = O_WRONLY | O_APPEND | O_CREAT | O_NOFOLLOW; -diff -Nru glibc-2.3.3.old/malloc/malloc.c glibc-2.3.3/malloc/malloc.c ---- glibc-2.3.3.old/malloc/malloc.c 2004-09-16 15:03:22.000000000 -0400 -+++ glibc-2.3.3/malloc/malloc.c 2004-09-16 15:04:58.000000000 -0400 -@@ -321,6 +321,10 @@ - #define assert(x) ((void)0) - #endif - -+#include <abort-instr.h> -+#ifndef ABORT_INSTRUCTION -+#define ABORT_INSTRUCTION -+#endif - - /* - INTERNAL_SIZE_T is the word-size used for internal bookkeeping -diff -Nru glibc-2.3.3.old/sysdeps/generic/unsecvars.h glibc-2.3.3/sysdeps/generic/unsecvars.h ---- glibc-2.3.3.old/sysdeps/generic/unsecvars.h 2004-09-16 15:03:11.000000000 -0400 -+++ glibc-2.3.3/sysdeps/generic/unsecvars.h 2004-09-16 15:04:58.000000000 -0400 -@@ -3,6 +3,8 @@ - with a '\0' explicitly. */ - #define UNSECURE_ENVVARS \ - "LD_PRELOAD\0" \ -+ "LD_DEBUG\0" \ -+ "LD_TRACE_PRELINKING\0" \ - "LD_LIBRARY_PATH\0" \ - "LD_ORIGIN_PATH\0" \ - "LD_DEBUG_OUTPUT\0" \ diff --git a/sys-libs/glibc/files/locales.build b/sys-libs/glibc/files/locales.build deleted file mode 100644 index ce2a88cf..00000000 --- a/sys-libs/glibc/files/locales.build +++ /dev/null @@ -1,25 +0,0 @@ -# This file names the list of locales to be built when glibc is installed. -# The format is <locale>/<charmap>, where <locale> is a locale from the -# /usr/share/i18n/locales directory, and <charmap> is name of one of the files -# in /usr/share/i18n/charmaps/. All blank lines and lines starting with # are -# ignored. Here is an example: -# en_US/ISO-8859-1 -# -# For the full list, see the file SUPPORTED in the glibc tarball: -# glibc/localedata/SUPPORTED - -en_US/ISO-8859-1 -en_US.UTF-8/UTF-8 -ja_JP.EUC-JP/EUC-JP -ja_JP.UTF-8/UTF-8 -ja_JP/EUC-JP -en_HK/ISO-8859-1 -en_PH/ISO-8859-1 -de_DE/ISO-8859-1 -de_DE@euro/ISO-8859-15 -es_MX/ISO-8859-1 -fa_IR/UTF-8 -fr_FR/ISO-8859-1 -fr_FR@euro/ISO-8859-15 -it_IT/ISO-8859-1 - diff --git a/sys-libs/glibc/files/nscd b/sys-libs/glibc/files/nscd deleted file mode 100755 index b102de07..00000000 --- a/sys-libs/glibc/files/nscd +++ /dev/null @@ -1,64 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nscd,v 1.7 2007/02/23 12:09:39 uberlord Exp $ - -depend() { - use dns ldap net slapd -} - -checkconfig() { - if [ ! -d /var/run/nscd ] ; then - mkdir -p /var/run/nscd - chmod 755 /var/run/nscd - fi - if [ -z "${NSCD_PERMS_OK}" ] && [ "$(stat -c %a /var/run/nscd)" != "755" ] ; then - echo "" - ewarn "nscd run dir is not world readable, you should reset the perms:" - ewarn "chmod 755 /var/run/nscd" - ewarn "chmod a+rw /var/run/nscd/socket" - echo "" - ewarn "To disable this warning, set 'NSCD_PERMS_OK' in /etc/conf.d/nscd" - echo "" - fi -} - -start() { - checkconfig - - ebegin "Starting Name Service Cache Daemon" - local secure=`while read curline ; do - table=${curline%:*} - entries=${curline##$table:} - table=${table%%[^a-z]*} - case $table in - passwd*|group*|hosts) - for entry in $entries ; do - case $entry in - nisplus*) - /usr/sbin/nscd_nischeck $table || \ - /echo "-S $table,yes" - ;; - esac - done - ;; - esac - done < /etc/nsswitch.conf` - local pidfile="$(strings /usr/sbin/nscd | grep nscd.pid)" - mkdir -p "$(dirname ${pidfile})" - save_options pidfile "${pidfile}" - start-stop-daemon --start --quiet \ - --exec /usr/sbin/nscd --pidfile "${pidfile}" \ - -- $secure - eend $? -} - -stop() { - local pidfile="$(get_options pidfile)" - [ -n "${pidfile}" ] && pidfile="--pidfile ${pidfile}" - ebegin "Shutting down Name Service Cache Daemon" - start-stop-daemon --stop --quiet --exec /usr/sbin/nscd ${pidfile} - eend $? -} - -# vim:ts=4 diff --git a/sys-libs/glibc/files/nscd.conf b/sys-libs/glibc/files/nscd.conf deleted file mode 100644 index 226dda37..00000000 --- a/sys-libs/glibc/files/nscd.conf +++ /dev/null @@ -1,45 +0,0 @@ -# -# /etc/nscd.conf -# -# An example Name Service Cache config file. This file is needed by nscd. -# -# Legal entries are: -# -# logfile <file> -# debug-level <level> -# threads <#threads to use> -# server-user <user to run server as instead of root> -# server-user is ignored if nscd is started with -S parameters -# -# enable-cache <service> <yes|no> -# positive-time-to-live <service> <time in seconds> -# negative-time-to-live <service> <time in seconds> -# suggested-size <service> <prime number> -# check-files <service> <yes|no> -# -# Currently supported cache names (services): passwd, group, hosts -# - - -# logfile /var/log/nscd.log -# threads 6 -# server-user nobody - debug-level 0 - - enable-cache passwd yes - positive-time-to-live passwd 600 - negative-time-to-live passwd 20 - suggested-size passwd 211 - check-files passwd yes - - enable-cache group yes - positive-time-to-live group 3600 - negative-time-to-live group 60 - suggested-size group 211 - check-files group yes - - enable-cache hosts yes - positive-time-to-live hosts 3600 - negative-time-to-live hosts 20 - suggested-size hosts 211 - check-files hosts yes diff --git a/sys-libs/glibc/files/nsswitch.conf b/sys-libs/glibc/files/nsswitch.conf deleted file mode 100644 index eb169614..00000000 --- a/sys-libs/glibc/files/nsswitch.conf +++ /dev/null @@ -1,24 +0,0 @@ -# /etc/nsswitch.conf: -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/nsswitch.conf,v 1.1 2005/05/17 00:52:41 vapier Exp $ - -passwd: compat -shadow: compat -group: compat - -# passwd: db files nis -# shadow: db files nis -# group: db files nis - -hosts: files dns -networks: files dns - -services: db files -protocols: db files -rpc: db files -ethers: db files -netmasks: files -netgroup: files -bootparams: files - -automount: files -aliases: files diff --git a/sys-libs/glibc/files/test-__thread.c b/sys-libs/glibc/files/test-__thread.c deleted file mode 100644 index be37c0e2..00000000 --- a/sys-libs/glibc/files/test-__thread.c +++ /dev/null @@ -1,7 +0,0 @@ -extern __thread int i; - -int main() { - - return 0; -} - diff --git a/sys-libs/glibc/files/test-sysctl_h.c b/sys-libs/glibc/files/test-sysctl_h.c deleted file mode 100644 index 1512b4d5..00000000 --- a/sys-libs/glibc/files/test-sysctl_h.c +++ /dev/null @@ -1,7 +0,0 @@ -#include <linux/sysctl.h> - -int main() -{ - return 0; -} - diff --git a/sys-libs/glibc/glibc-2.8_p20080602-r3.ebuild b/sys-libs/glibc/glibc-2.8_p20080602-r3.ebuild deleted file mode 100644 index 0f91b005..00000000 --- a/sys-libs/glibc/glibc-2.8_p20080602-r3.ebuild +++ /dev/null @@ -1,381 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.8_p20080602-r1.ebuild,v 1.16 2009/04/13 15:17:59 jer Exp $ - -inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib - -DESCRIPTION="GNU libc6 (also called glibc2) C library" -HOMEPAGE="http://www.gnu.org/software/libc/libc.html" - -LICENSE="LGPL-2" -KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86" -RESTRICT="strip" # strip ourself #46186 -EMULTILIB_PKG="true" - -# Configuration variables -if [[ ${PV} == *_p* ]] ; then -RELEASE_VER=${PV%_p*} -BRANCH_UPDATE="" -SNAP_VER=${PV#*_p} -else -RELEASE_VER=${PV} -BRANCH_UPDATE="" -SNAP_VER="" -fi -MANPAGE_VER="" # pregenerated manpages -INFOPAGE_VER="" # pregenerated infopages -PATCH_VER="6" # Gentoo patchset -PORTS_VER=${RELEASE_VER} # version of glibc ports addon -LIBIDN_VER="" # version of libidn addon -LT_VER="" # version of linuxthreads addon -NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires -#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires - -IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}" -S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER+-${SNAP_VER}} - -# Here's how the cross-compile logic breaks down ... -# CTARGET - machine that will target the binaries -# CHOST - machine that will host the binaries -# CBUILD - machine that will build the binaries -# If CTARGET != CHOST, it means you want a libc for cross-compiling. -# If CHOST != CBUILD, it means you want to cross-compile the libc. -# CBUILD = CHOST = CTARGET - native build/install -# CBUILD != (CHOST = CTARGET) - cross-compile a native build -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler -# For install paths: -# CHOST = CTARGET - install into / -# CHOST != CTARGET - install into /usr/CTARGET/ - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then - export CTARGET=${CATEGORY/cross-} - fi -fi - -[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} - -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} -alt_libdir() { - if is_crosscompile ; then - echo /usr/${CTARGET}/$(get_libdir) - else - echo /$(get_libdir) - fi -} - -if is_crosscompile ; then - SLOT="${CTARGET}-2.2" -else - # Why SLOT 2.2 you ask yourself while sippin your tea ? - # Everyone knows 2.2 > 0, duh. - SLOT="2.2" - PROVIDE="virtual/libc" -fi - -# General: We need a new-enough binutils for as-needed -# arch: we need to make sure our binutils/gcc supports TLS -DEPEND=">=sys-devel/gcc-3.4.4 - arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) - ppc? ( >=sys-devel/gcc-4.1.0 ) - ppc64? ( >=sys-devel/gcc-4.1.0 ) - >=sys-devel/binutils-2.15.94 - ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} - >=sys-devel/gcc-config-1.3.12 - >=app-misc/pax-utils-0.1.10 - virtual/os-headers - nls? ( sys-devel/gettext ) - >=sys-apps/sandbox-1.2.18.1-r2 - >=sys-apps/portage-2.1.2 - selinux? ( sys-libs/libselinux )" -RDEPEND="nls? ( sys-devel/gettext ) - selinux? ( sys-libs/libselinux )" - -if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then - DEPEND="${DEPEND} ${CATEGORY}/gcc" - [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" -else - DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c" - RDEPEND="${RDEPEND} sys-libs/timezone-data" -fi - -SRC_URI=$( - upstream_uris() { - echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 - } - gentoo_uris() { - local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" - devspace=${devspace//HTTP/http://dev.gentoo.org/} - echo mirror://gentoo/$1 ${devspace//URI/$1} - } - - TARNAME=${PN} - if [[ -n ${SNAP_VER} ]] ; then - TARNAME="${PN}-${RELEASE_VER}" - [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} - upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 - else - upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 - fi - [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 - [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 - [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 - [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 - [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 - [[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2 - [[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2 -) - -# eblit-include [--skip] <function> [version] -eblit-include() { - local skipable=false - [[ $1 == "--skip" ]] && skipable=true && shift - - local e v func=$1 ver=$2 - [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" - for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do - e="${FILESDIR}/eblits/${func}${v}.eblit" - if [[ -e ${e} ]] ; then - source "${e}" - return 0 - fi - done - ${skipable} && return 0 - die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" -} - -# eblit-run-maybe <function> -# run the specified function if it is defined -eblit-run-maybe() { - [[ $(type -t "$@") == "function" ]] && "$@" -} - -# eblit-run <function> [version] -# aka: src_unpack() { eblit-run src_unpack ; } -eblit-run() { - eblit-include --skip common "${*:2}" - eblit-include "$@" - eblit-run-maybe eblit-$1-pre - eblit-${PN}-$1 || die - eblit-run-maybe eblit-$1-post -} - -src_unpack() { eblit-run src_unpack ; } -src_compile() { eblit-run src_compile ; } -src_test() { eblit-run src_test ; } -src_install() { eblit-run src_install ; } - -eblit-src_unpack-post() { - if use hardened ; then - cd "${S}" - einfo "Patching to get working PIE binaries on PIE (hardened) platforms" - gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch - epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch - epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch - - einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" - cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ - debug/stack_chk_fail.c || die - cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-chk_fail.c \ - debug/chk_fail.c || die - - if use debug ; then - # When using Hardened Gentoo stack handler, have smashes dump core for - # analysis - debug only, as core could be an information leak - # (paranoia). - sed -i \ - -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ - debug/Makefile \ - || die "Failed to modify debug/Makefile for debug stack handler" - sed -i \ - -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ - debug/Makefile \ - || die "Failed to modify debug/Makefile for debug fortify handler" - fi - - # Build nscd with ssp-all - sed -i \ - -e 's:-fstack-protector$:-fstack-protector-all:' \ - nscd/Makefile \ - || die "Failed to ensure nscd builds with ssp-all" - fi -} - -maint_pkg_create() { - local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}" - cd ${base} - local stamp=$(date +%Y%m%d) - local d - for d in libc ports ; do - #(cd ${d} && cvs up) - case ${d} in - libc) tarball="${P}";; - ports) tarball="${PN}-ports-${PV}";; - esac - rm -f ${tarball}* - ln -sf ${d} ${tarball} - tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma - du -b "${T}"/${tarball}.tar.lzma - done -} - -pkg_setup() { - # prevent native builds from downgrading ... maybe update to allow people - # to change between diff -r versions ? (2.3.6-r4 -> 2.3.6-r2) - if [[ ${ROOT} == "/" ]] && [[ ${CBUILD} == ${CHOST} ]] && [[ ${CHOST} == ${CTARGET} ]] ; then - if has_version '>'${CATEGORY}/${PF} ; then - eerror "Sanity check to keep you from breaking your system:" - eerror " Downgrading glibc is not supported and a sure way to destruction" - die "aborting to save your system" - fi - - # Check for broken kernels #262698 - cd "${T}" - printf '#include <pwd.h>\nint main(){return getpwuid(0)==0;}\n' > kern-clo-test.c - emake kern-clo-test || die - if ! ./kern-clo-test ; then - eerror "Your patched vendor kernel is broken. You need to get an" - eerror "update from whoever is providing the kernel to you." - eerror "http://sourceware.org/bugzilla/show_bug.cgi?id=5227" - die "keeping your system alive, say thank you" - fi - fi - - # users have had a chance to phase themselves, time to give em the boot - if [[ -e ${ROOT}/etc/locale.gen ]] && [[ -e ${ROOT}/etc/locales.build ]] ; then - eerror "You still haven't deleted ${ROOT}/etc/locales.build." - eerror "Do so now after making sure ${ROOT}/etc/locale.gen is kosher." - die "lazy upgrader detected" - fi - - if [[ ${CTARGET} == i386-* ]] ; then - eerror "i386 CHOSTs are no longer supported." - eerror "Chances are you don't actually want/need i386." - eerror "Please read http://www.gentoo.org/doc/en/change-chost.xml" - die "please fix your CHOST" - fi - - if [[ -n ${LT_VER} ]] ; then - if use nptlonly && ! use nptl ; then - eerror "If you want nptlonly, add nptl to your USE too ;p" - die "nptlonly without nptl" - fi - fi - - if [[ -e /proc/xen ]] && [[ $(tc-arch) == "x86" ]] && ! is-flag -mno-tls-direct-seg-refs ; then - ewarn "You are using Xen but don't have -mno-tls-direct-seg-refs in your CFLAGS." - ewarn "This will result in a 50% performance penalty, which is probably not what you want." - fi - - use hardened && ! gcc-specs-pie && \ - ewarn "PIE hardening not applied, as your compiler doesn't default to PIE" - - export LC_ALL=C #252802 -} - -fix_lib64_symlinks() { - # the original Gentoo/AMD64 devs decided that since 64bit is the native - # bitdepth for AMD64, lib should be used for 64bit libraries. however, - # this ignores the FHS and breaks multilib horribly... especially - # since it wont even work without a lib64 symlink anyways. *rolls eyes* - # see bug 59710 for more information. - # Travis Tilley <lv@gentoo.org> (08 Aug 2004) - if [ -L ${ROOT}/lib64 ] ; then - ewarn "removing /lib64 symlink and moving lib to lib64..." - ewarn "dont hit ctrl-c until this is done" - rm ${ROOT}/lib64 - # now that lib64 is gone, nothing will run without calling ld.so - # directly. luckily the window of brokenness is almost non-existant - use amd64 && /lib/ld-linux-x86-64.so.2 /bin/mv ${ROOT}/lib ${ROOT}/lib64 - use ppc64 && /lib/ld64.so.1 /bin/mv ${ROOT}/lib ${ROOT}/lib64 - # all better :) - ldconfig - ln -s lib64 ${ROOT}/lib - einfo "done! :-)" - einfo "fixed broken lib64/lib symlink in ${ROOT}" - fi - if [ -L ${ROOT}/usr/lib64 ] ; then - rm ${ROOT}/usr/lib64 - mv ${ROOT}/usr/lib ${ROOT}/usr/lib64 - ln -s lib64 ${ROOT}/usr/lib - einfo "fixed broken lib64/lib symlink in ${ROOT}/usr" - fi - if [ -L ${ROOT}/usr/X11R6/lib64 ] ; then - rm ${ROOT}/usr/X11R6/lib64 - mv ${ROOT}/usr/X11R6/lib ${ROOT}/usr/X11R6/lib64 - ln -s lib64 ${ROOT}/usr/X11R6/lib - einfo "fixed broken lib64/lib symlink in ${ROOT}/usr/X11R6" - fi -} - -pkg_preinst() { - # nothing to do if just installing headers - just_headers && return - - # PPC64+others may want to eventually be added to this logic if they - # decide to be multilib compatible and FHS compliant. note that this - # chunk of FHS compliance only applies to 64bit archs where 32bit - # compatibility is a major concern (not IA64, for example). - - # amd64's 2005.0 is the first amd64 profile to not need this code. - # 2005.0 is setup properly, and this is executed as part of the - # 2004.3 -> 2005.0 upgrade script. - # It can be removed after 2004.3 has been purged from portage. - { use amd64 || use ppc64; } && [ "$(get_libdir)" == "lib64" ] && ! has_multilib_profile && fix_lib64_symlinks - - # it appears that /lib/tls is sometimes not removed. See bug - # 69258 for more info. - if [[ -d ${ROOT}/$(alt_libdir)/tls ]] && [[ ! -d ${D}/$(alt_libdir)/tls ]] ; then - ewarn "nptlonly or -nptl in USE, removing /${ROOT}$(alt_libdir)/tls..." - rm -r "${ROOT}"/$(alt_libdir)/tls || die - fi - - # simple test to make sure our new glibc isnt completely broken. - # make sure we don't test with statically built binaries since - # they will fail. also, skip if this glibc is a cross compiler. - [[ ${ROOT} != "/" ]] && return 0 - [[ -d ${D}/$(get_libdir) ]] || return 0 - cd / #228809 - local x striptest - for x in date env ls true uname ; do - x=$(type -p ${x}) - [[ -z ${x} ]] && continue - striptest=$(LC_ALL="C" file -L ${x} 2>/dev/null) - [[ -z ${striptest} ]] && continue - [[ ${striptest} == *"statically linked"* ]] && continue - "${D}"/$(get_libdir)/ld-*.so \ - --library-path "${D}"/$(get_libdir) \ - ${x} > /dev/null \ - || die "simple run test (${x}) failed" - done -} - -pkg_postinst() { - # nothing to do if just installing headers - just_headers && return - - if ! tc-is-cross-compiler && [[ -x ${ROOT}/usr/sbin/iconvconfig ]] ; then - # Generate fastloading iconv module configuration file. - "${ROOT}"/usr/sbin/iconvconfig --prefix="${ROOT}" - fi - - if ! is_crosscompile && [[ ${ROOT} == "/" ]] ; then - # Reload init ... - /sbin/telinit U - - # if the host locales.gen contains no entries, we'll install everything - local locale_list="${ROOT}etc/locale.gen" - if [[ -z $(locale-gen --list --config "${locale_list}") ]] ; then - ewarn "Generating all locales; edit /etc/locale.gen to save time/space" - locale_list="${ROOT}usr/share/i18n/SUPPORTED" - fi - local x jobs - for x in ${MAKEOPTS} ; do [[ ${x} == -j* ]] && jobs=${x#-j} ; done - locale-gen -j ${jobs:-1} --config "${locale_list}" - fi -} diff --git a/sys-libs/glibc/glibc-2.9_p20081201-r4.ebuild b/sys-libs/glibc/glibc-2.9_p20081201-r4.ebuild deleted file mode 100644 index 55cb0c3a..00000000 --- a/sys-libs/glibc/glibc-2.9_p20081201-r4.ebuild +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/glibc-2.9_p20081201-r2.ebuild,v 1.7 2009/04/01 06:17:18 vapier Exp $ - -inherit eutils versionator libtool toolchain-funcs flag-o-matic gnuconfig multilib - -DESCRIPTION="GNU libc6 (also called glibc2) C library" -HOMEPAGE="http://www.gnu.org/software/libc/libc.html" - -LICENSE="LGPL-2" -KEYWORDS="~alpha amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86" -RESTRICT="strip" # strip ourself #46186 -EMULTILIB_PKG="true" - -# Configuration variables -if [[ ${PV} == *_p* ]] ; then -RELEASE_VER=${PV%_p*} -BRANCH_UPDATE="" -SNAP_VER=${PV#*_p} -else -RELEASE_VER=${PV} -BRANCH_UPDATE="" -SNAP_VER="" -fi -MANPAGE_VER="" # pregenerated manpages -INFOPAGE_VER="" # pregenerated infopages -PATCH_VER="5" # Gentoo patchset -PORTS_VER=${RELEASE_VER} # version of glibc ports addon -LIBIDN_VER="" # version of libidn addon -LT_VER="" # version of linuxthreads addon -NPTL_KERN_VER=${NPTL_KERN_VER:-"2.6.9"} # min kernel version nptl requires -#LT_KERN_VER=${LT_KERN_VER:-"2.4.1"} # min kernel version linuxthreads requires - -IUSE="debug gd glibc-omitfp hardened multilib nls selinux profile vanilla crosscompile_opts_headers-only ${LT_VER:+glibc-compat20 nptl nptlonly}" -S=${WORKDIR}/glibc-${RELEASE_VER}${SNAP_VER+-${SNAP_VER}} - -# Here's how the cross-compile logic breaks down ... -# CTARGET - machine that will target the binaries -# CHOST - machine that will host the binaries -# CBUILD - machine that will build the binaries -# If CTARGET != CHOST, it means you want a libc for cross-compiling. -# If CHOST != CBUILD, it means you want to cross-compile the libc. -# CBUILD = CHOST = CTARGET - native build/install -# CBUILD != (CHOST = CTARGET) - cross-compile a native build -# (CBUILD = CHOST) != CTARGET - libc for cross-compiler -# CBUILD != CHOST != CTARGET - cross-compile a libc for a cross-compiler -# For install paths: -# CHOST = CTARGET - install into / -# CHOST != CTARGET - install into /usr/CTARGET/ - -export CBUILD=${CBUILD:-${CHOST}} -export CTARGET=${CTARGET:-${CHOST}} -if [[ ${CTARGET} == ${CHOST} ]] ; then - if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then - export CTARGET=${CATEGORY/cross-} - fi -fi - -[[ ${CTARGET} == hppa* ]] && NPTL_KERN_VER=${NPTL_KERN_VER/2.6.9/2.6.20} - -is_crosscompile() { - [[ ${CHOST} != ${CTARGET} ]] -} -alt_libdir() { - if is_crosscompile ; then - echo /usr/${CTARGET}/$(get_libdir) - else - echo /$(get_libdir) - fi -} - -if is_crosscompile ; then - SLOT="${CTARGET}-2.2" -else - # Why SLOT 2.2 you ask yourself while sippin your tea ? - # Everyone knows 2.2 > 0, duh. - SLOT="2.2" - PROVIDE="virtual/libc" -fi - -# General: We need a new-enough binutils for as-needed -# arch: we need to make sure our binutils/gcc supports TLS -DEPEND=">=sys-devel/gcc-3.4.4 - arm? ( >=sys-devel/binutils-2.16.90 >=sys-devel/gcc-4.1.0 ) - ppc? ( >=sys-devel/gcc-4.1.0 ) - ppc64? ( >=sys-devel/gcc-4.1.0 ) - >=sys-devel/binutils-2.15.94 - ${LT_VER:+nptl? (} >=sys-kernel/linux-headers-${NPTL_KERN_VER} ${LT_VER:+)} - >=sys-devel/gcc-config-1.3.12 - >=app-misc/pax-utils-0.1.10 - virtual/os-headers - nls? ( sys-devel/gettext ) - >=sys-apps/sandbox-1.2.18.1-r2 - >=sys-apps/portage-2.1.2 - selinux? ( sys-libs/libselinux )" -RDEPEND="nls? ( sys-devel/gettext ) - selinux? ( sys-libs/libselinux )" - -if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then - DEPEND="${DEPEND} ${CATEGORY}/gcc" - [[ ${CATEGORY} == *-linux* ]] && DEPEND="${DEPEND} ${CATEGORY}/linux-headers" -else - DEPEND="${DEPEND} >=sys-libs/timezone-data-2007c" - RDEPEND="${RDEPEND} sys-libs/timezone-data" -fi - -SRC_URI=$( - upstream_uris() { - echo mirror://gnu/glibc/$1 ftp://sources.redhat.com/pub/glibc/{releases,snapshots}/$1 mirror://gentoo/$1 - } - gentoo_uris() { - local devspace="HTTP~vapier/dist/URI HTTP~azarah/glibc/URI" - devspace=${devspace//HTTP/http://dev.gentoo.org/} - echo mirror://gentoo/$1 ${devspace//URI/$1} - } - - TARNAME=${PN} - if [[ -n ${SNAP_VER} ]] ; then - TARNAME="${PN}-${RELEASE_VER}" - [[ -n ${PORTS_VER} ]] && PORTS_VER=${SNAP_VER} - upstream_uris ${TARNAME}-${SNAP_VER}.tar.bz2 - else - upstream_uris ${TARNAME}-${RELEASE_VER}.tar.bz2 - fi - [[ -n ${LIBIDN_VER} ]] && upstream_uris glibc-libidn-${LIBIDN_VER}.tar.bz2 - [[ -n ${PORTS_VER} ]] && upstream_uris ${TARNAME}-ports-${PORTS_VER}.tar.bz2 - [[ -n ${LT_VER} ]] && upstream_uris ${TARNAME}-linuxthreads-${LT_VER}.tar.bz2 - [[ -n ${BRANCH_UPDATE} ]] && gentoo_uris glibc-${RELEASE_VER}-branch-update-${BRANCH_UPDATE}.patch.bz2 - [[ -n ${PATCH_VER} ]] && gentoo_uris glibc-${RELEASE_VER}-patches-${PATCH_VER}.tar.bz2 - [[ -n ${MANPAGE_VER} ]] && gentoo_uris glibc-manpages-${MANPAGE_VER}.tar.bz2 - [[ -n ${INFOPAGE_VER} ]] && gentoo_uris glibc-infopages-${INFOPAGE_VER}.tar.bz2 -) - -# eblit-include [--skip] <function> [version] -eblit-include() { - local skipable=false - [[ $1 == "--skip" ]] && skipable=true && shift - [[ $1 == pkg_* ]] && skipable=true - - local e v func=$1 ver=$2 - [[ -z ${func} ]] && die "Usage: eblit-include <function> [version]" - for v in ${ver:+-}${ver} -${PVR} -${PV} "" ; do - e="${FILESDIR}/eblits/${func}${v}.eblit" - if [[ -e ${e} ]] ; then - source "${e}" - return 0 - fi - done - ${skipable} && return 0 - die "Could not locate requested eblit '${func}' in ${FILESDIR}/eblits/" -} - -# eblit-run-maybe <function> -# run the specified function if it is defined -eblit-run-maybe() { - [[ $(type -t "$@") == "function" ]] && "$@" -} - -# eblit-run <function> [version] -# aka: src_unpack() { eblit-run src_unpack ; } -eblit-run() { - eblit-include --skip common "${*:2}" - eblit-include "$@" - eblit-run-maybe eblit-$1-pre - eblit-${PN}-$1 - eblit-run-maybe eblit-$1-post -} - -src_unpack() { eblit-run src_unpack ; } -src_compile() { eblit-run src_compile ; } -src_test() { eblit-run src_test ; } -src_install() { eblit-run src_install ; } - -# FILESDIR might not be available during binpkg install -for x in setup {pre,post}inst ; do - e="${FILESDIR}/eblits/pkg_${x}.eblit" - if [[ -e ${e} ]] ; then - . "${e}" - eval "pkg_${x}() { eblit-run pkg_${x} ; }" - fi -done - -eblit-src_unpack-post() { - if use hardened ; then - cd "${S}" - einfo "Patching to get working PIE binaries on PIE (hardened) platforms" - gcc-specs-pie && epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-pie.patch - epatch "${FILESDIR}"/2.5/glibc-2.5-hardened-configure-picdefault.patch - epatch "${FILESDIR}"/2.7/glibc-2.7-hardened-inittls-nosysenter.patch - - einfo "Installing Hardened Gentoo SSP and FORTIFY_SOURCE handler" - cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-stack_chk_fail.c \ - debug/stack_chk_fail.c || die - cp -f "${FILESDIR}"/2.6/glibc-2.6-gentoo-chk_fail.c \ - debug/chk_fail.c || die - - if use debug ; then - # When using Hardened Gentoo stack handler, have smashes dump core for - # analysis - debug only, as core could be an information leak - # (paranoia). - sed -i \ - -e '/^CFLAGS-backtrace.c/ iCFLAGS-stack_chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ - debug/Makefile \ - || die "Failed to modify debug/Makefile for debug stack handler" - sed -i \ - -e '/^CFLAGS-backtrace.c/ iCFLAGS-chk_fail.c = -DSSP_SMASH_DUMPS_CORE' \ - debug/Makefile \ - || die "Failed to modify debug/Makefile for debug fortify handler" - fi - - # Build nscd with ssp-all - sed -i \ - -e 's:-fstack-protector$:-fstack-protector-all:' \ - nscd/Makefile \ - || die "Failed to ensure nscd builds with ssp-all" - fi -} - -maint_pkg_create() { - local base="/usr/local/src/gnu/glibc/glibc-${PV:0:1}_${PV:2:1}" - cd ${base} - local stamp=$(date +%Y%m%d) - local d - for d in libc ports ; do - #(cd ${d} && cvs up) - case ${d} in - libc) tarball="${P}";; - ports) tarball="${PN}-ports-${PV}";; - esac - rm -f ${tarball}* - ln -sf ${d} ${tarball} - tar hcf - ${tarball} --exclude-vcs | lzma > "${T}"/${tarball}.tar.lzma - du -b "${T}"/${tarball}.tar.lzma - done -} diff --git a/sys-libs/glibc/metadata.xml b/sys-libs/glibc/metadata.xml deleted file mode 100644 index d48a5315..00000000 --- a/sys-libs/glibc/metadata.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<herd>toolchain</herd> -<use> - <flag name='erandom'>Enable erandom/frandom support in glibc for ssp</flag> - <flag name='glibc-compat20'>Enable the glibc-compat addon</flag> - <flag name='glibc-omitfp'>Configure glibc with --enable-omitfp which lets - the build system determine when it is safe to use - -fomit-frame-pointer</flag> - <flag name='linuxthreads-tls'>Configure the linuxthreads glibc with - --with-_thread if supported by your system. --with-tls is always enabled - if supported and is NOT controlled by this switch. So the glibc built - will always support TLS binaries. This toggle chooses whether or not - glibc itself uses TLS. If you're concerned about backwards compatibility - with old binaries, leave this off.</flag> - <flag name='nptlonly'>Disables building the linuxthreads fallback in glibc - ebuilds that support building both linuxthread and nptl</flag> - <flag name='userlocales'>Build only the locales specified in - /etc/locales.build</flag> -</use> -</pkgmetadata> diff --git a/sys-libs/libstdc++-v3/ChangeLog b/sys-libs/libstdc++-v3/ChangeLog deleted file mode 100644 index 34c843e2..00000000 --- a/sys-libs/libstdc++-v3/ChangeLog +++ /dev/null @@ -1,7 +0,0 @@ -# ChangeLog for sys-libs/libstdc++-v3 -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: $ - - 06 Sep 2009; Magnus Granberg <zorry@ume.nu> -Manifest: - Fix ticket #78 Thanks for testing blueness. - diff --git a/sys-libs/libstdc++-v3/Manifest b/sys-libs/libstdc++-v3/Manifest deleted file mode 100644 index 3d11f34e..00000000 --- a/sys-libs/libstdc++-v3/Manifest +++ /dev/null @@ -1,5 +0,0 @@ -DIST gcc-3.3.6-patches-1.6.tar.bz2 48814 RMD160 3f25b67015c6e4d874690c48d23292a670501e0c SHA1 aba4661d50787aad26849497d45194804bf21b73 SHA256 c692f8f00d16947e13dd86ca974e419c35d1befee9ee915fa6c50a741487ef63 -DIST gcc-3.3.6.tar.bz2 23972413 RMD160 b32c7a08c690857f0ac52dda3deb47cf5775d967 SHA1 2cc43978bb09af6c2ccfdf74797d10d7cc2596fb SHA256 1c1aa533c67e9da5e55ed4f5736258dc753466bd716bdae3fb88fb66e6ff1d7f -EBUILD libstdc++-v3-3.3.6.ebuild 4793 RMD160 51a8851b2e45ba5320d87664524d1a2aadc43e00 SHA1 f9034693d62ce41d47fa8f17010f44932dcef654 SHA256 5fced8531174653f19f80f19b22798c24f21bb8497e384b32187a691b5fa3960 -MISC ChangeLog 226 RMD160 f65f211f7530de7a167418a30e10cb31c94f4de7 SHA1 e882a14a91982475d397b6f66563fd273ecce978 SHA256 935337fb11409cd055d96c83c91e47a94322bf5689a3fbe1cafd2fe44165c07b -MISC metadata.xml 162 RMD160 d002486a43522f2116b1d9d59828c484956d66e2 SHA1 d6b4923897f6ae673b4f93646f5b4ba61d5a2c3c SHA256 65a915d44de1f01d4b7f72d313b4192c38374a9835d24988c00c1e73dca5805a diff --git a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6.ebuild b/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6.ebuild deleted file mode 100644 index 50e0f45e..00000000 --- a/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6.ebuild +++ /dev/null @@ -1,176 +0,0 @@ -# Copyright 1999-2009 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libstdc++-v3/libstdc++-v3-3.3.6.ebuild,v 1.25 2009/08/09 16:43:31 halcy0n Exp $ - -inherit eutils flag-o-matic libtool multilib - -transform_known_flags() { - declare setting - - # and on x86, we just need to filter the 3.4 specific amd64 -marchs - replace-cpu-flags k8 athlon64 opteron x86-64 - - # gcc 3.3 doesn't support -march=pentium-m - replace-cpu-flags pentium-m pentium3m pentium3 - - #GCC 3.3 does not understand G3, G4, G5 on ppc - replace-cpu-flags G3 750 - replace-cpu-flags G4 7400 - replace-cpu-flags G5 7400 -} - -is_arch_allowed() { - i386_processor_table="i386 i486 i586 pentium pentium-mmx winchip-c6 \ - winchip2 c3 i686 pentiumpro pentium2 pentium3 pentium4 prescott \ - nocona k6 k6-2 k6-3 athlon athlon-tbird x86-64 athlon-4 athlon-xp \ - athlon-mp" - - for proc in ${i386_processor_table} ; do - [ "${proc}" == "${1}" ] && return 0 - done - - mips_processor_table="mips1 mips2 mips3 mips4 mips32 mips64 r3000 r2000 \ - r3900 r6000 r4000 vr4100 vr4111 vr4120 vr4300 r4400 r4600 orion \ - r4650 r8000 vr5000 vr5400 vr5500 4kc 4kp 5kc 20kc sr71000 sb1" - - for proc in ${mips_processor_table} ; do - [ "${proc}" == "${1}" ] && return 0 - done - - rs6000_processor_table="common power power2 power3 power4 powerpc \ - powerpc64 rios rios1 rsc rsc1 rios2 rs64a 401 403 405 505 601 602 \ - 603 603e ec603e 604 604e 620 630 740 750 7400 7450 8540 801 821 823 \ - 860" - - for proc in ${rs6000_processor_table} ; do - [ "${proc}" == "${1}" ] && return 0 - done - - return 1 -} - -do_filter_flags() { - declare setting - - # In general gcc does not like optimization, and add -O2 where - # it is safe. This is especially true for gcc 3.3 + 3.4 - replace-flags -O? -O2 - - # gcc 3.3 doesn't support -mtune on numerous archs, so xgcc will fail - setting="`get-flag mtune`" - [ ! -z "${setting}" ] && filter-flags -mtune="${setting}" - - # in gcc 3.3 there is a bug on ppc64 where if -mcpu is used - # the compiler incorrectly assumes the code you are about to build - # is 32 bit - use ppc64 && setting="`get-flag mcpu`" - [ ! -z "${setting}" ] && filter-flags -mcpu="${setting}" - - # only allow the flags that we -know- are supported - transform_known_flags - setting="`get-flag march`" - if [ ! -z "${setting}" ] ; then - is_arch_allowed "${setting}" || filter-flags -march="${setting}" - fi - setting="`get-flag mcpu`" - if [ ! -z "${setting}" ] ; then - is_arch_allowed "${setting}" || filter-flags -mcpu="${setting}" - fi - - # xgcc wont understand gcc 3.4 flags... - filter-flags -fno-unit-at-a-time - filter-flags -funit-at-a-time - filter-flags -fweb - filter-flags -fno-web - filter-flags -mno-tls-direct-seg-refs - - # xgcc isnt patched with propolice - filter-flags -fstack-protector-all - filter-flags -fno-stack-protector-all - filter-flags -fstack-protector - filter-flags -fno-stack-protector - - # xgcc isnt patched with the gcc symbol visibility patch - filter-flags -fvisibility-inlines-hidden - filter-flags -fvisibility=hidden - - # bug #269433 - filter-flags -fno-strict-overflow - # ticket #78 - filter-flags -fstrict-overflow - - # ...sure, why not? - strip-unsupported-flags - - strip-flags -} - -PATCH_VER="1.6" - -DESCRIPTION="Compatibility package for running binaries linked against a pre gcc 3.4 libstdc++" -HOMEPAGE="http://gcc.gnu.org/libstdc++/" -SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-${PV}.tar.bz2 - mirror://gentoo/gcc-${PV}-patches-${PATCH_VER}.tar.bz2" - -LICENSE="GPL-2 LGPL-2.1" -SLOT="5" -KEYWORDS="amd64 hppa ~mips ppc -ppc64 sparc x86 ~x86-fbsd" -IUSE="multilib nls" - -S=${WORKDIR}/gcc-${PV} - -src_unpack() { - unpack ${A} - cd "${S}" - EPATCH_SUFFIX="patch" epatch "${WORKDIR}"/patch - elibtoolize --portage --shallow - ./contrib/gcc_update --touch - mkdir -p "${WORKDIR}"/build - - if use multilib ; then - # ugh, this shit has to match the way we've hacked gcc else - # the build falls apart #259215 - sed -i \ - -e 's:\(MULTILIB_OSDIRNAMES = \).*:\1../lib64 ../lib32:' \ - "${S}"/gcc/config/i386/t-linux64 \ - || die "sed failed!" - fi -} - -src_compile() { - cd "${WORKDIR}"/build - do_filter_flags - ECONF_SOURCE=${S} - econf \ - --enable-shared \ - --with-system-zlib \ - --enable-languages=c++ \ - --enable-threads=posix \ - --enable-long-long \ - --disable-checking \ - --enable-cstdio=stdio \ - --enable-__cxa_atexit \ - $(use_enable multilib) \ - $(use_enable nls) \ - $(use_with !nls included-gettext) \ - || die - - touch "${S}"/gcc/c-gperf.h - - emake all-target-libstdc++-v3 || die -} - -src_install() { - emake -j1 \ - -C "${WORKDIR}"/build \ - DESTDIR="${D}" \ - install-target-libstdc++-v3 || die - - # scrub everything but the library we care about - pushd "${D}" >/dev/null - mv usr/lib* . || die - rm -rf usr - rm -f lib*/*.{a,la,so} || die - dodir /usr - mv lib* usr/ || die -} diff --git a/sys-libs/libstdc++-v3/metadata.xml b/sys-libs/libstdc++-v3/metadata.xml deleted file mode 100644 index fb4199eb..00000000 --- a/sys-libs/libstdc++-v3/metadata.xml +++ /dev/null @@ -1,5 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> -<herd>toolchain</herd> -</pkgmetadata> |