[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2015-04-12 Thread Michał Górny
commit: 26b682b761319af5dc0c5d5af2ffb441faf612f0
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Fri Dec 12 06:41:58 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Fri Dec 12 06:41:58 2014 +
URL:https://gitweb.gentoo.org/dev/mgorny.git/commit/?id=26b682b7

sys-devel/gcc: Call gcc-config for multilib ABIs

Package-Manager: portage-2.2.15

 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index f51749c..e77f7e9 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -606,17 +606,17 @@ src_install() {
 
 switch_gcc() {
local curr_config curr_pv
-   # config name: ${CTARGET}-${PV}
-   curr_config=$(env -i ROOT=${ROOT} gcc-config -c ${CTARGET} 21)
+   # config name: ${CHOST}-${PV}
+   curr_config=$(env -i ROOT=${ROOT} gcc-config -c ${CHOST} 21)
 
# no config? switch!
if [[ -z ${curr_config} ]]; then
-   gcc-config ${CTARGET}-${PV}
+   gcc-config ${CHOST}-${PV}
return
fi
 
# some config? argh, we need to parse it.
-   split_config=( $(env -i ROOT=${ROOT} gcc-config -S ${CTARGET}) )
+   split_config=( $(env -i ROOT=${ROOT} gcc-config -S ${CHOST}) )
 
# different branch? we aren't doing such leaps ourselves.
if [[ ${split_config[1]%.*} != ${PV%.*} ]]; then
@@ -625,19 +625,19 @@ switch_gcc() {
fi
 
if [[ -n ${split_config[2]} ]]; then
-   if [[ -f 
${ROOT}/etc/env.d/gcc/${CTARGET}-${PV}-${split_config[2]} ]]
+   if [[ -f 
${ROOT}/etc/env.d/gcc/${CHOST}-${PV}-${split_config[2]} ]]
then
-   gcc-config ${CTARGET}-${PV}-${split_config[2]}
+   gcc-config ${CHOST}-${PV}-${split_config[2]}
return
else
ewarn Spec '${split_config[2]}' used so far is no 
longer available.
ewarn The default will be used instead.
fi
 
-   gcc-config ${CTARGET}-${PV}
+   gcc-config ${CHOST}-${PV}
fi
 }
 
 pkg_postinst() {
-   switch_gcc
+   multilib_foreach_abi switch_gcc
 }



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/files/, sys-devel/gcc/

2015-04-12 Thread Michał Górny
commit: e3442972f033a50c39ce9c406489449c010b87a2
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Sun Apr 12 14:00:05 2015 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Sun Apr 12 14:00:05 2015 +
URL:https://gitweb.gentoo.org/dev/mgorny.git/commit/?id=e3442972

Drop the gcc fork

 sys-devel/gcc/Manifest |   5 -
 .../gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch|  21 -
 sys-devel/gcc/files/gcc-configure-texinfo.patch|  16 -
 sys-devel/gcc/files/gcc-spec-env-r1.patch  |  87 ---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild| 643 -
 sys-devel/gcc/metadata.xml |  26 -
 6 files changed, 798 deletions(-)

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
deleted file mode 100644
index 9761876..000
--- a/sys-devel/gcc/Manifest
+++ /dev/null
@@ -1,5 +0,0 @@
-DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 
f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 
779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517
 WHIRLPOOL 
8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e
-DIST gcc-4.9.2-patches-1.0.tar.bz2 18213 SHA256 
e4e9a665381beb4018779a14d5124528a9d5df0e0772f3b7639390d6bda51515 SHA512 
27deba0db6a500b160829fdcf5fc9a70be4b4fbd45c89d18dd2d0808d42803657693d0ed0f2b664e020a0d2ac39cdfe550e397eb4c2a6f64220cae1e7a16ff20
 WHIRLPOOL 
7e04ed92038f19a9b00fe0022c2c7ce3df8621fccca95cb2da37333a5edcc0857efe96aed68f5c4b51db19ecd23ec1194412f1bc24730cea30db7b342c12dfdf
-DIST gcc-4.9.2-piepatches-v0.6.1.tar.bz2 14185 SHA256 
590d11ea5723812fff3239c5eaed4b040b26a92586de0e42a84438f742eaac0b SHA512 
89560e96bc205e848936acc4d3423ff5e1ea5ee478848edfe2b992585cea0df21eb102b1f1bee55c10568d4ca54bb3f4e8ae72aa695e34a908abfda3585fb992
 WHIRLPOOL 
e6db4a2e5fdf762bd4f0fa70d630499bf6789a0c3b7ca193b455bb22f95f5f2983358ba9f28bd85b571a3a44a691ca797762302a1f2ea63ce170752f7e44128b
-DIST gcc-4.9.2-uclibc-patches-1.0.tar.bz2 2540 SHA256 
3ca63cba5edb01367352fcd558890a838630deb4c30f82f4c7e8074ad75e57fc SHA512 
69f6f80e23efee0b937fca0f2056e17b4fe643817d2394bbfd16cbb453d74c76a0bb8727815f689a795897d9cd5e06ecc74d3d9ad45175fe837ad008eee09706
 WHIRLPOOL 
3946513e83960fe891267e103e434cae0616cd45b5e7eaff5f4f671741c1445941cf80b7497231cf50f137941c01859dbbac0a95745fb7ae663a3ee512bd7162
-DIST gcc-4.9.2.tar.bz2 89939747 SHA256 
2020c98295856aa13fda0f2f3a4794490757fc24bcca918d52cc8b4917b972dd SHA512 
e96cba06d572dbe7f382a2b00fd9297dcf9f9219d46a9ad0bd904dc36d5e7db3335e422640b79a27fed6fde91b0731732b94a0e2fbcd47344d6779f8ba1f4f9c
 WHIRLPOOL 
c4afdd0ec98e6f903044f1d3061fd96cf1e9bcbe2f90c388f5bc9ff8b2493b94367e84fdff7c2075ba37e2f950ecf2dba7c11786c653c2c7e86a5e8ff7d98e85

diff --git a/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch 
b/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch
deleted file mode 100644
index 11c3731..000
--- a/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urN gcc-4.6.4/libgcc/Makefile.in gcc-4.6.4-fixed/libgcc/Makefile.in
 gcc-4.6.4/libgcc/Makefile.in   2013-04-24 00:12:29.213242770 +
-+++ gcc-4.6.4-fixed/libgcc/Makefile.in 2013-04-24 01:19:14.909313041 +
-@@ -945,7 +945,7 @@
- 
-   $(subst @multilib_dir@,$(MULTIDIR),$(subst \
-   @shlib_base_name@,libunwind,$(subst \
--  @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIBUNWIND_INSTALL
-+  @shlib_slibdir_qual@,$(MULTISUBDIR),$(SHLIBUNWIND_INSTALL
- 
- install-shared:
-   $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
-@@ -956,7 +956,7 @@
- 
-   $(subst @multilib_dir@,$(MULTIDIR),$(subst \
-   @shlib_base_name@,libgcc_s,$(subst \
--  @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL
-+  @shlib_slibdir_qual@,$(MULTISUBDIR),$(SHLIB_INSTALL
- 
- install-leaf: $(install-shared) $(install-libunwind)
-   $(mkinstalldirs) $(DESTDIR)$(inst_libdir)

diff --git a/sys-devel/gcc/files/gcc-configure-texinfo.patch 
b/sys-devel/gcc/files/gcc-configure-texinfo.patch
deleted file mode 100644
index ddc098d..000
--- a/sys-devel/gcc/files/gcc-configure-texinfo.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-Chances are quite good that the installed makeinfo is sufficient.
-So ignore false positives where the makeinfo installed is so new
-that it violates the cheesy version grep.
-
-http://bugs.gentoo.org/198182
-
 configure
-+++ configure
-@@ -3573,6 +3573,6 @@
-   :
- else
--  MAKEINFO=$MISSING makeinfo
-+  :
- fi
- ;;
- 

diff --git a/sys-devel/gcc/files/gcc-spec-env-r1.patch 
b/sys-devel/gcc/files/gcc-spec-env-r1.patch
deleted file mode 100644
index a589268..000
--- a/sys-devel/gcc/files/gcc-spec-env-r1.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-2013-08-22  Magnus 

[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-09 Thread Michał Górny
commit: a10ecb0dd18da9aea633dec4b0036f56e7c09f39
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Tue Dec  9 13:40:02 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Tue Dec  9 13:40:02 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=a10ecb0d

sys-devel/gcc: Add missing pax-utils inherit.

Package-Manager: portage-2.2.15

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index 46f4310..f51749c 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -20,7 +20,7 @@ MULTILIB_COMPAT=(
abi_s390_32 abi_s390_64
 )
 
-inherit eutils flag-o-matic multilib multilib-build toolchain-funcs
+inherit eutils flag-o-matic multilib multilib-build pax-utils toolchain-funcs
 
 DESCRIPTION=The GNU Compiler Collection
 HOMEPAGE=http://gcc.gnu.org/;



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-06 Thread Michał Górny
commit: 7849f0d9afdcf5730cc6c5ef48eecb788290c822
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Sat Dec  6 09:25:28 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Sat Dec  6 09:25:28 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=7849f0d9

sys-devel/gcc: Block multilib-gcc-wrapper

Package-Manager: portage-2.2.15

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index e559cac..46f4310 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -59,6 +59,8 @@ DEPEND=${RDEPEND}
)
elibc_glibc? ( =sys-libs/glibc-2.8 )
=sys-devel/binutils-2.20
+RDEPEND=${RDEPEND}
+   !sys-devel/multilib-gcc-wrapper
 
 PDEPEND=elibc_glibc? ( =sys-libs/glibc-2.8 )
=sys-devel/gcc-config-1.7



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 3383cdddf094227a9f5669c42929a3cde5f1e106
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Wed Dec  3 09:54:57 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Wed Dec  3 10:44:10 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=3383cddd

sys-devel/gcc: clean up install, move gdb files to auto-load

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 13 +
 1 file changed, 13 insertions(+)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index d0b386f..c61809d 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -557,12 +557,25 @@ src_install() {
 
# Punt some tools which are really only useful while building gcc
find ${D} -name install-tools -prune -type d -exec rm -r {} + || die
+   # Some random 'dir' file?
+   rm ${D}${DATAPATH}/info/dir || die
 
create_gcc_symlinks
strip_gcc_executables
 
+   # move *-gdb.py into /usr/share/gdb/auto-load tree
+   if use cxx; then
+   local py gdbdir=${D}usr/share/gdb/auto-load
+   while read -r -d '' py; do
+   mkdir -p ${gdbdir}/${py%/*} || die
+   mv ${D}${py} ${gdbdir}/${py%/*}/ || die
+   done  (cd ${D}  find -name '*-gdb.py' -print0)
+   fi
+
if use cxx  use doc; then
cd ${WORKDIR}/build/${CTARGET}/libstdc++-v3/doc/doxygen/man 
|| die
+   # clean up some random files with build-dir paths
+   rm -f man*/*${P}*
cp -r man* ${D}${DATAPATH}/man/ || die
fi
 



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: d737f2afe4b37770fe9d7cc0fedc14b16caaa540
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Wed Dec  3 08:52:12 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Wed Dec  3 08:52:12 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=d737f2af

sys-devel/gcc: fixes to install

Simplify (and fix) fixed include removal. Fix info- and man-page install.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 25 -
 1 file changed, 8 insertions(+), 17 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index a552b15..d0b386f 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -410,8 +410,8 @@ src_configure() {
export gcc_cv_prog_makeinfo_modern=no
 
# Build in a separate build tree
-   mkdir -p ${WORKDIR}/build
-   pushd ${WORKDIR}/build  /dev/null
+   mkdir -p ${WORKDIR}/build || die
+   cd ${WORKDIR}/build || die
 
# and now to do the actual configuration
addwrite /dev/zero
@@ -419,9 +419,8 @@ src_configure() {
echo ${@}
${@} || die 'configure failed'
 
-   # return to whatever directory we were in before
-   popd  /dev/null
-
+   # we don't want fixed includes :)
+   echo :  ${S}/fixincludes/fixinc.in
 }
 
 src_compile() {
@@ -460,6 +459,7 @@ create_gcc_symlinks() {
# Add CTARGET-ed symlinks to make gcc-wrapper happy.
ln -s ${t} ${CTARGET}-${t} || die
 
+   # BROKEN: no gcc-ar, gcc-nm, gcc-ranlib
# Install versioned symlinks in /usr/bin.
dosym ${BINPATH}/${t} /usr/bin/${CTARGET}-${t}-${PV}
dosym ${CTARGET}-${t}-${PV} /usr/bin/${t}-${PV}
@@ -551,16 +551,7 @@ src_install() {
local f
while read -r -d '' f; do
cp ${S}/${f} ${f} || die
-   done  (cd ${S}  find gcc -name '*.info')
-
-   # Clean up include-fixed
-   find gcc/include-fixed -type l -delete || die
-   while read -r -d '' f; do
-   if grep 'auto-edited by fixincludes' ${f}; then
-   rm ${f} || die
-   fi
-   done  (find gcc/include-fixed -type f)
-   find gcc/include-fixed -type d -empty -delete || die
+   done  (cd ${S}  find gcc -name '*.info' -print0)
 
emake -j1 DESTDIR=${D} install
 
@@ -570,9 +561,9 @@ src_install() {
create_gcc_symlinks
strip_gcc_executables
 
-   if use doc; then
+   if use cxx  use doc; then
cd ${WORKDIR}/build/${CTARGET}/libstdc++-v3/doc/doxygen/man 
|| die
-   doman man*/*
+   cp -r man* ${D}${DATAPATH}/man/ || die
fi
 
# Don't scan .gox files for executable stacks - false positives



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: e2ba90779e2c596d964777f706aca5c79e223e50
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Thu Dec  4 09:15:23 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Thu Dec  4 10:44:03 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=e2ba9077

sys-devel/gcc: Multilib gcc wrapper support.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 73 ++---
 1 file changed, 59 insertions(+), 14 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index eb7b8b1..e559cac 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -425,18 +425,54 @@ create_gcc_symlinks() {
# gcc-wrapper doesn't have an alias for it...
ln -f -s g++ c++ || die
 
+   # Store for reuse in create_multilib_wrapper().
+   GCC_TOOLS=( * )
+
local t
-   for t in *; do
+   for t in ${GCC_TOOLS[@]}; do
# Add CTARGET-ed symlinks to make gcc-wrapper happy.
ln -s ${t} ${CTARGET}-${t} || die
 
-   # BROKEN: no gcc-ar, gcc-nm, gcc-ranlib
# Install versioned symlinks in /usr/bin.
dosym ${BINPATH}/${t} /usr/bin/${CTARGET}-${t}-${PV}
dosym ${CTARGET}-${t}-${PV} /usr/bin/${t}-${PV}
done
 }
 
+create_multilib_wrappers() {
+   local native_ctarget=${CTARGET}
+
+   create_multilib_wrapper() {
+   multilib_is_native_abi  continue
+
+   local abi_binpath=${PREFIX}/${CHOST}/gcc-bin/${PV}
+   exeinto ${abi_binpath}
+   dodir ${abi_binpath}
+
+   local t
+   for t in ${GCC_TOOLS[@]}; do
+   if [[ ${t} == gcov || ${t} == gcc-* ]]; then
+   # those tools have no multilib powers, we 
symlink them as-is
+   dosym ../../../${BINPATH#${PREFIX}/}/${t} \
+   ${abi_binpath}/${t} || die
+   else
+   # use canonical name to avoid playing with ${0}
+   cat  ${T}/wrapper -_EOF_
+   #!${EPREFIX}/bin/sh
+   exec ${native_ctarget}-${t}-${PV} 
$(get_abi_CFLAGS) \${@}
+   _EOF_
+
+   newexe ${T}/wrapper ${t}
+   fi
+
+   # Now symlink fun.
+   dosym ${t} ${abi_binpath}/${CHOST}-${t} || die
+   dosym ${abi_binpath}/${t} 
/usr/bin/${CHOST}-${t}-${PV}
+   done
+   }
+   multilib_foreach_abi create_multilib_wrapper
+}
+
 strip_gcc_executables() {
# TODO: find out how to avoid prepstrip
env RESTRICT= CHOST=${CHOST} prepstrip ${D}${BINPATH}
@@ -455,7 +491,7 @@ XGCC() { get_make_var GCC_FOR_TARGET ; }
 
 create_gcc_env_entry() {
dodir /etc/env.d/gcc
-   local gcc_envd_base=/etc/env.d/gcc/${CTARGET}-${PV}
+   local gcc_envd_base=/etc/env.d/gcc/${CHOST}-${PV}
 
local gcc_specs_file
local gcc_envd_file=${D}${gcc_envd_base}
@@ -485,15 +521,17 @@ create_gcc_env_entry() {
mosdirs=${mosdir}${mosdirs:+:${mosdirs}}
done
 
+   local abi_binpath=${PREFIX}/${CHOST}/gcc-bin/${PV}
+
cat -EOF  ${gcc_envd_file}
-   PATH=${BINPATH}
-   ROOTPATH=${BINPATH}
-   GCC_PATH=${BINPATH}
+   PATH=${abi_binpath}
+   ROOTPATH=${abi_binpath}
+   GCC_PATH=${abi_binpath}
LDPATH=${ldpaths}
MANPATH=${DATAPATH}/man
INFOPATH=${DATAPATH}/info
STDCXX_INCDIR=${STDCXX_INCDIR##*/}
-   CTARGET=${CTARGET}
+   CTARGET=${CHOST}
GCC_SPECS=${gcc_specs_file}
MULTIOSDIRS=${mosdirs}
EOF
@@ -516,6 +554,7 @@ src_install() {
rm ${D}${DATAPATH}/info/dir || die
 
create_gcc_symlinks
+   create_multilib_wrappers
strip_gcc_executables
 
# move *-gdb.py into /usr/share/gdb/auto-load tree
@@ -544,14 +583,20 @@ src_install() {
 
prune_libtool_files
 
-   # entries and specs
-   create_gcc_env_entry
+   create_env_entries() {
+   # entries and specs
+   create_gcc_env_entry
+   if use hardened; then
+   # setup the hardenedno* specs files and the vanilla 
specs file.
+   create_gcc_env_entry hardenednopiessp
+   create_gcc_env_entry hardenednopie
+   create_gcc_env_entry hardenednossp
+   create_gcc_env_entry vanilla
+   fi
+   }
+   multilib_foreach_abi create_gcc_env_entry
+
if use hardened; then
-   # setup the hardenedno* specs files and the vanilla specs file.
-   create_gcc_env_entry 

[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 5bf388dd85865798525b150b76035389554a9e02
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Thu Dec  4 08:44:51 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Thu Dec  4 08:44:51 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=5bf388dd

sys-devel/gcc: Clean up USE=multilib, add REQUIRED_USE for mips

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index 2ab3ffd..eb7b8b1 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -35,8 +35,7 @@ SLOT=${PV%.*}
 KEYWORDS=~amd64 ~x86
 
 IUSE=altivec +cxx doc fixed-point +fortran go graphite hardened libssp
-   multilib +nls +nptl objc objc-gc objc++ +openmp +pie +sanitize
-   test vanilla
+   +nls +nptl objc objc-gc objc++ +openmp +pie +sanitize test vanilla
 
 RDEPEND=
=dev-libs/gmp-4.3.2
@@ -70,6 +69,11 @@ REQUIRED_USE=
hardened? ( pie !vanilla )
objc++? ( cxx )
pie? ( !vanilla )
+# Don't have fine-tuned switching of MIPS ABIs -- either one or all.
+REQUIRED_USE=${REQUIRED_USE}
+   abi_mips_o32? ( abi_mips_n32? ( abi_mips_n64 ) )
+   abi_mips_o32? ( abi_mips_n64? ( abi_mips_n32 ) )
+   abi_mips_n32? ( abi_mips_n64? ( abi_mips_o32 ) )
 
 # Custom magic.
 RESTRICT=strip
@@ -348,7 +352,6 @@ src_configure() {
gcc_abis=${gcc_abis[*]}
 
myconf+=(
-   --enable-multilib
--with-multilib-list=${gcc_abis// /,}
--with-abi=$(get_gcc_amd64_abi 
${DEFAULT_ABI})
)



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/files/, sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 923e50e4a537bbcf714d29c091ee85b64ba54bba
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Tue Dec  2 10:25:45 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Tue Dec  2 10:25:45 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=923e50e4

sys-devel/gcc: initial fork

---
 sys-devel/gcc/Manifest  |   5 +
 sys-devel/gcc/files/gcc-configure-texinfo.patch |  16 +
 sys-devel/gcc/files/gcc-spec-env-r1.patch   |  87 +
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 453 
 4 files changed, 561 insertions(+)

diff --git a/sys-devel/gcc/Manifest b/sys-devel/gcc/Manifest
new file mode 100644
index 000..9761876
--- /dev/null
+++ b/sys-devel/gcc/Manifest
@@ -0,0 +1,5 @@
+DIST gcc-4.4.3-specs-0.2.0.tar.bz2 2004 SHA256 
f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 SHA512 
779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517
 WHIRLPOOL 
8a1e45aad9d306cb19de93c63b5854a97e629d90852feb6861dcfca042b6257705304fc13ad65655a4cb227d36b83fc6063648c94f270821574ee0e85307094e
+DIST gcc-4.9.2-patches-1.0.tar.bz2 18213 SHA256 
e4e9a665381beb4018779a14d5124528a9d5df0e0772f3b7639390d6bda51515 SHA512 
27deba0db6a500b160829fdcf5fc9a70be4b4fbd45c89d18dd2d0808d42803657693d0ed0f2b664e020a0d2ac39cdfe550e397eb4c2a6f64220cae1e7a16ff20
 WHIRLPOOL 
7e04ed92038f19a9b00fe0022c2c7ce3df8621fccca95cb2da37333a5edcc0857efe96aed68f5c4b51db19ecd23ec1194412f1bc24730cea30db7b342c12dfdf
+DIST gcc-4.9.2-piepatches-v0.6.1.tar.bz2 14185 SHA256 
590d11ea5723812fff3239c5eaed4b040b26a92586de0e42a84438f742eaac0b SHA512 
89560e96bc205e848936acc4d3423ff5e1ea5ee478848edfe2b992585cea0df21eb102b1f1bee55c10568d4ca54bb3f4e8ae72aa695e34a908abfda3585fb992
 WHIRLPOOL 
e6db4a2e5fdf762bd4f0fa70d630499bf6789a0c3b7ca193b455bb22f95f5f2983358ba9f28bd85b571a3a44a691ca797762302a1f2ea63ce170752f7e44128b
+DIST gcc-4.9.2-uclibc-patches-1.0.tar.bz2 2540 SHA256 
3ca63cba5edb01367352fcd558890a838630deb4c30f82f4c7e8074ad75e57fc SHA512 
69f6f80e23efee0b937fca0f2056e17b4fe643817d2394bbfd16cbb453d74c76a0bb8727815f689a795897d9cd5e06ecc74d3d9ad45175fe837ad008eee09706
 WHIRLPOOL 
3946513e83960fe891267e103e434cae0616cd45b5e7eaff5f4f671741c1445941cf80b7497231cf50f137941c01859dbbac0a95745fb7ae663a3ee512bd7162
+DIST gcc-4.9.2.tar.bz2 89939747 SHA256 
2020c98295856aa13fda0f2f3a4794490757fc24bcca918d52cc8b4917b972dd SHA512 
e96cba06d572dbe7f382a2b00fd9297dcf9f9219d46a9ad0bd904dc36d5e7db3335e422640b79a27fed6fde91b0731732b94a0e2fbcd47344d6779f8ba1f4f9c
 WHIRLPOOL 
c4afdd0ec98e6f903044f1d3061fd96cf1e9bcbe2f90c388f5bc9ff8b2493b94367e84fdff7c2075ba37e2f950ecf2dba7c11786c653c2c7e86a5e8ff7d98e85

diff --git a/sys-devel/gcc/files/gcc-configure-texinfo.patch 
b/sys-devel/gcc/files/gcc-configure-texinfo.patch
new file mode 100644
index 000..ddc098d
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-configure-texinfo.patch
@@ -0,0 +1,16 @@
+Chances are quite good that the installed makeinfo is sufficient.
+So ignore false positives where the makeinfo installed is so new
+that it violates the cheesy version grep.
+
+http://bugs.gentoo.org/198182
+
+--- configure
 configure
+@@ -3573,6 +3573,6 @@
+   :
+ else
+-  MAKEINFO=$MISSING makeinfo
++  :
+ fi
+ ;;
+ 

diff --git a/sys-devel/gcc/files/gcc-spec-env-r1.patch 
b/sys-devel/gcc/files/gcc-spec-env-r1.patch
new file mode 100644
index 000..a589268
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-spec-env-r1.patch
@@ -0,0 +1,87 @@
+2013-08-22  Magnus Granberg zo...@gentoo.org
+
+   * gcc/gcc.c (main): Add support for external spec file via the 
GCC_SPECS env var
+   and move the process of the user specifed specs.
+
+This allows us to easily control pie/ssp defaults with gcc-config profiles.
+Original patch by Rob Holland
+Extended to support multiple entries separated by ':' by Kevin F. Quinn
+Modified to use getenv instead of poisoned GET_ENVIRONMENT by Ryan Hill
+Modified to process the GCC_SPECS env var befor DRIVER_SELF_SPECS by 
Magnus Granberg
+
+--- gcc-4.8-20130210/gcc/gcc.c 2013-02-05 16:55:31.0 +0100
 gcc-4.8-20130210-work/gcc/gcc.c2013-07-26 02:32:14.625089864 +0200
+@@ -6427,6 +6428,48 @@ main (int argc, char **argv)
+ do_option_spec (option_default_specs[i].name,
+   option_default_specs[i].spec);
+ 
++#if !(defined (__MSDOS__) || defined (OS2) || defined (VMS) || defined 
(WIN32))
++  /* Add specs listed in GCC_SPECS.  Note; in the process of separating
++   * each spec listed, the string is overwritten at token boundaries
++   * (':') with '\0', an effect of strtok_r().
++   */
++  specs_file = getenv (GCC_SPECS);
++  if (specs_file  (strlen(specs_file)  0))
++{
++  char *spec, *saveptr;
++  for (spec=strtok_r(specs_file,:,saveptr);
++   spec!=NULL;
++   spec=strtok_r(NULL,:,saveptr))
++{
++ 

[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: ca82c7fd37522d32124e0fe06384a9c2f5387dcf
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Wed Dec  3 23:24:49 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Wed Dec  3 23:24:49 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=ca82c7fd

sys-devel/gcc: Add supposedly universal multilib support

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 98 +
 1 file changed, 55 insertions(+), 43 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index 3ef83c8..f243294 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -12,7 +12,15 @@ PIE_VER=0.6.1
 SPECS_VER=0.2.0
 SPECS_GCC_VER=4.4.3
 
-inherit eutils flag-o-matic multilib toolchain-funcs
+# ABIs supported by gcc/ebuild.
+MULTILIB_COMPAT=(
+   abi_x86_32 abi_x86_64 abi_x86_x32
+   abi_mips_n32 abi_mips_n64 abi_mips_o32
+   abi_ppc_32 abi_ppc_64
+   abi_s390_32 abi_s390_64
+)
+
+inherit eutils flag-o-matic multilib multilib-build toolchain-funcs
 
 DESCRIPTION=The GNU Compiler Collection
 HOMEPAGE=http://gcc.gnu.org/;
@@ -25,8 +33,8 @@ SRC_URI=mirror://gnu/${PN}/${P}/${P}.tar.bz2
 LICENSE=GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ 
gcc-runtime-library-exception-3.1 ) FDL-1.3+
 SLOT=${PV%.*}
 KEYWORDS=~amd64 ~x86
-IUSE=abi_x86_32 abi_x86_64 abi_x86_x32
-   altivec +cxx doc fixed-point +fortran go graphite hardened libssp
+
+IUSE=altivec +cxx doc fixed-point +fortran go graphite hardened libssp
multilib +nls +nptl objc objc-gc objc++ +openmp +pie +sanitize
test vanilla
 
@@ -161,21 +169,24 @@ src_prepare() {
./contrib/gcc_update --touch
 }
 
-gcc-abi-map() {
-   # Convert the ABI name we use in Gentoo to what gcc uses
-   local map=()
-   case ${CTARGET} in
-   mips*)   map=(o32 32 n32 n32 n64 64) ;;
-   x86_64*) map=(amd64 m64 x86 m32 x32 mx32) ;;
+# Map Gentoo ABI into gcc ABI, for MIPS.
+get_gcc_mips_abi() {
+   case ${1} in
+   o32) echo 32;;
+   n32) echo n32;;
+   n64) echo 64;;
+   *) die Invalid MIPS ABI: ${1};;
esac
+}
 
-   local m
-   for m in ${map[@]} ; do
-   if [[ $1 == ${l% *} ]]; then
-   echo ${l#* }
-   break
-   fi
-   done
+# Map Gentoo ABI into gcc ABI, for amd64.
+get_gcc_amd64_abi() {
+   case ${1} in
+   x86*) echo m32;;
+   amd64*) echo m64;;
+   x32) echo mx32;;
+   *) die Invalid AMD64 ABI: ${1};;
+   esac
 }
 
 src_configure() {
@@ -253,7 +264,6 @@ src_configure() {
# mips fixed-point arithmetic
$(use_enable fixed-point)
 
-   $(use_enable multilib)
$(use_enable openmp libgomp)
--disable-libmudflap
$(use_enable libssp)
@@ -295,20 +305,6 @@ src_configure() {
: ${TARGET_MULTILIB_ABIS:=${MULTILIB_ABIS}}
: ${TARGET_DEFAULT_ABI:=${DEFAULT_ABI}}
 
-   # translate our notion of multilibs into gcc's
-   local abi list
-   for abi in $(get_all_abis TARGET); do
-   local l=$(gcc-abi-map ${abi})
-   [[ -n ${l} ]]  list+=,${l}
-   done
-   if [[ -n ${list} ]] ; then
-   case ${CTARGET} in
-   x86_64*)
-   myconf+=( --with-multilib-list=${list:1} )
-   ;;
-   esac
-   fi
-
case $(tc-is-softfloat) in
yes)myconf+=( --with-float=soft ) ;;
softfp) myconf+=( --with-float=softfp ) ;;
@@ -320,7 +316,24 @@ src_configure() {
esac
esac
 
-   local with_abi_map=()
+   # Multilib guessing.
+   # From this point forward, ABI variables may correspond to CTARGET.
+   [[ ${CHOST} != ${CTARGET} ]]  multilib_env ${CTARGET}
+   local abis=( $(multilib_get_enabled_abis) )
+
+   # isn't that brilliant?
+   if [[ ${#abis[@]} -gt 1 ]]; then
+   myconf+=( --enable-multilib )
+   else
+   myconf+=( --disable-multilib )
+   fi
+
+   # now, verify!
+   # (abis may be empty on non-multilib arches)
+   if [[ ${abis[@]} ]]  ! has ${DEFAULT_ABI} ${abis[@]}; then
+   die DEFAULT_ABI ${DEFAULT_ABI} not enabled (USE 
misconfiguration?)
+   fi
+
case $(tc-arch) in
arm) #264534 #414395
local a arm_arch=${CTARGET%%-*}
@@ -355,20 +368,19 @@ src_configure() {
fi
;;
mips)
-   # Add --with-abi flags to set default ABI
-   myconf+=( --with-abi=$(gcc-abi-map 
${TARGET_DEFAULT_ABI}) )
+   myconf+=( --with-abi=$(get_gcc_mips_abi 

[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: c63021863f23023bd8d9f5637773324179f76ed5
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Wed Dec  3 18:40:20 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Wed Dec  3 18:40:20 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=c6302186

sys-devel/gcc: Remove dupe --enable-version-specific-runtime-libs

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index c61809d..6c8d007 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -242,6 +242,7 @@ src_configure() {
# going to link in -lrt to all C++ apps.  #411681
$(use_enable cxx libstdcxx-time)
 
+   # Put libs in gcc-specific subdirectories.
--enable-version-specific-runtime-libs
--enable-lto
--enable-shared
@@ -399,13 +400,6 @@ src_configure() {
amd64|x86) myconf+=( --enable-targets=all ) ;;
esac
 
-   # 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.
-   [[ ${CTARGET} == *-darwin* ]]  \
-   myconf+=( --enable-version-specific-runtime-libs )
-
# Disable gcc info regeneration #464008
export gcc_cv_prog_makeinfo_modern=no
 



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 5baaebf94e47dacbcdd80890a736ab5139694a08
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Tue Dec  2 22:42:36 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Tue Dec  2 22:42:36 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=5baaebf9

sys-devel/gcc: Replace old toolchain.eclass variable references.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index 6f6d359..a552b15 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -195,7 +195,7 @@ src_configure() {
LIBPATH=${PREFIX}/lib/gcc/${CTARGET}/${PV}
INCPATH=${LIBPATH}/include
DATAPATH=${PREFIX}/share/gcc-data/${CTARGET}/${PV}
-   STDCXX_INCDIR=${LIBPATH}/include/g++-v${GCC_BRANCH_VER%%.*}
+   STDCXX_INCDIR=${LIBPATH}/include/g++-v${PV%%.*}
 
local langs=( c )
use cxx  langs+=( c++ )
@@ -469,7 +469,7 @@ create_gcc_symlinks() {
 strip_gcc_executables() {
# TODO: find out how to avoid prepstrip
env RESTRICT= CHOST=${CHOST} prepstrip ${D}${BINPATH}
-   env RESTRICT= CHOST=${CHOST} prepstrip 
${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}
+   env RESTRICT= CHOST=${CHOST} prepstrip 
${D}${PREFIX}/libexec/gcc/${CTARGET}/${PV}
env RESTRICT= CHOST=${CTARGET} prepstrip ${D}${LIBPATH}
 }
 
@@ -580,8 +580,8 @@ src_install() {
export QA_WX_LOAD=usr/lib*/go/*/*.gox
 
# Disable RANDMMAP so PCH works. #301299
-   pax-mark -r ${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1
-   pax-mark -r 
${D}${PREFIX}/libexec/gcc/${CTARGET}/${GCC_CONFIG_VER}/cc1plus
+   pax-mark -r ${D}${PREFIX}/libexec/gcc/${CTARGET}/${PV}/cc1
+   pax-mark -r ${D}${PREFIX}/libexec/gcc/${CTARGET}/${PV}/cc1plus
 
prune_libtool_files
 



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: b9baf2eefe8267bfb201b8360a39eea4cf98bc22
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Wed Dec  3 19:40:52 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Wed Dec  3 19:40:52 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=b9baf2ee

sys-devel/gcc: Add abi_x86_* flags to control ABIs on amd64.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 31 ---
 1 file changed, 12 insertions(+), 19 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index 6c8d007..c575f57 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -25,7 +25,8 @@ SRC_URI=mirror://gnu/${PN}/${P}/${P}.tar.bz2
 LICENSE=GPL-3+ LGPL-3+ || ( GPL-3+ libgcc libstdc++ 
gcc-runtime-library-exception-3.1 ) FDL-1.3+
 SLOT=${PV%.*}
 KEYWORDS=~amd64 ~x86
-IUSE=altivec +cxx doc fixed-point +fortran go graphite hardened libssp
+IUSE=abi_x86_32 abi_x86_64 abi_x86_x32
+   altivec +cxx doc fixed-point +fortran go graphite hardened libssp
multilib +nls +nptl objc objc-gc objc++ +openmp +pie +sanitize +ssp
test vanilla
 
@@ -359,25 +360,17 @@ src_configure() {
myconf+=( --with-abi=$(gcc-abi-map 
${TARGET_DEFAULT_ABI}) )
;;
amd64)
-   # drop the older/ABI checks once this get's merged into 
some
-   # version of gcc upstream
-   # translate our notion of multilibs into gcc's
-   local abi list
-   for abi in $(get_all_abis TARGET) ; do
-   local l=$(gcc-abi-map ${abi})
-   [[ -n ${l} ]]  list+=,${l}
-   done
-   if [[ -n ${list} ]] ; then
-   case ${CTARGET} in
-   x86_64*)
-   myconf+=( 
--with-multilib-list=${list:1} )
-   ;;
-   esac
-   fi
+   local abis=()
+   use abi_x86_32  abis+=( m32 )
+   use abi_x86_64  abis+=( m64 )
+   use abi_x86_x32  abis+=( mx32 )
+   abis=${abis[*]}
 
-   if has x32 $(get_all_abis TARGET) ; then
-   myconf+=( --with-abi=$(gcc-abi-map 
${TARGET_DEFAULT_ABI}) )
-   fi
+   myconf+=(
+   --enable-multilib
+   --with-multilib-list=${abis// /,}
+   --with-abi=$(gcc-abi-map 
${TARGET_DEFAULT_ABI})
+   )
;;
x86)
# Default arch for x86 is normally i386, lets give it a 
bump



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 46d9c185e4b3974e75578af3ec68e5c85e7dd17c
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Wed Dec  3 21:26:54 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Wed Dec  3 21:26:54 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=46d9c185

sys-devel/gcc: Add multilib.eclass inherit.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index c575f57..cb81f0a 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -12,7 +12,7 @@ PIE_VER=0.6.1
 SPECS_VER=0.2.0
 SPECS_GCC_VER=4.4.3
 
-inherit eutils flag-o-matic toolchain-funcs
+inherit eutils flag-o-matic multilib toolchain-funcs
 
 DESCRIPTION=The GNU Compiler Collection
 HOMEPAGE=http://gcc.gnu.org/;



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 60b1762710a9f6685d5d3b625cc7f7e6c361cb34
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Wed Dec  3 23:58:26 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Wed Dec  3 23:58:26 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=60b17627

sys-devel/gcc: Remove defunct setup_multilib_osdirnames()

Remove setup_multilib_osdirnames() function since the sed call
does not apply anymore.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 30 --
 1 file changed, 30 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index f243294..2ab3ffd 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -82,34 +82,6 @@ pkg_setup() {
unset LANGUAGES #265283
 }
 
-setup_multilib_osdirnames() {
-   use multilib || return 0
-
-   local config
-   local libdirs=../lib64 ../lib32
-
-   # this only makes sense for some Linux targets
-   case ${CTARGET} in
-   x86_64*-linux*)config=i386 ;;
-   powerpc64*-linux*) config=rs6000 ;;
-   sparc64*-linux*)   config=sparc ;;
-   s390x*-linux*) config=s390 ;;
-   *) return 0 ;;
-   esac
-   config+=/t-linux64
-
-   local sed_args=()
-   sed_args+=( -e 's:$[(]call if_multiarch[^)]*[)]::g' )
-   if [[ ${SYMLINK_LIB} == yes ]] ; then
-   einfo updating multilib directories to be: ${libdirs}
-   sed_args+=( -e 
'/^MULTILIB_OSDIRNAMES.*lib32/s:[$][(]if.*):../lib32:' )
-   else
-   einfo using upstream multilib; disabling lib32 autodetection
-   sed_args+=( -r -e 's:[$][(]if.*,(.*)[)]:\1:' )
-   fi
-   sed -i ${sed_args[@]} ${S}/gcc/config/${config} || die
-}
-
 src_prepare() {
export BRANDING_GCC_PKGVERSION=Gentoo ${PVR}::mgorny
 
@@ -160,8 +132,6 @@ src_prepare() {
find ${S} -name Makefile.in \
-exec sed -i 
'/^pkgconfigdir/s:=.*:=$(toolexeclibdir)/pkgconfig:' {} +
 
-   setup_multilib_osdirnames
-
# Prevent new texinfo from breaking old versions (see #198182, #464008)
epatch ${FILESDIR}/gcc-configure-texinfo.patch
 



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 04f0608fc606cb3316ad682fe3c6c4d51f7a4763
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Tue Dec  2 10:57:19 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Tue Dec  2 10:57:19 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=04f0608f

sys-devel/gcc: add metadata.xml

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/metadata.xml | 27 +++
 1 file changed, 27 insertions(+)

diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
new file mode 100644
index 000..313c609
--- /dev/null
+++ b/sys-devel/gcc/metadata.xml
@@ -0,0 +1,27 @@
+?xml version=1.0 encoding=UTF-8?
+!DOCTYPE pkgmetadata SYSTEM http://www.gentoo.org/dtd/metadata.dtd;
+pkgmetadata
+   maintainer
+   emailmgo...@gentoo.org/email
+   nameMichał Górny/name
+   /maintainer
+   use
+   flag name=fixed-pointEnable fixed-point arithmetic support 
for MIPS targets
+   in gcc (Warning: significantly increases compile 
time!)/flag
+   flag name=goBuild the GCC Go language frontend./flag
+   flag name=graphiteAdd support for the framework for loop
+   optimizations based on a polyhedral intermediate 
representation/flag
+   flag name=libsspBuild SSP support into a dedicated library 
rather than use the
+   code in the C library (DO NOT ENABLE THIS IF YOU DON'T 
KNOW WHAT IT DOES)/flag
+   flag name=pieEnable PIE support (DO NOT DISABLE)/flag
+   flag name=sspEnable SSP support (DO NOT DISABLE)/flag
+   flag name=objcBuild support for the Objective C code 
language/flag
+   flag name=objc++Build support for the Objective C++ 
language/flag
+   flag name=objc-gcBuild support for the Objective C code 
language Garbage
+   Collector/flag
+   flag name=sanitizeBuild support various sanitizer functions 
(ASAN/TSAN/etc...)/flag
+   /use
+   upstream
+   remote-id type=cpecpe:/a:gnu:gcc/remote-id
+   /upstream
+/pkgmetadata



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 4c8ff9de3e6523052ecdd8a7b6a4af88c7e78d36
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Tue Dec  2 10:53:48 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Tue Dec  2 10:53:48 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=4c8ff9de

sys-devel/gcc: add missing doxygen dep

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index e9ad848..bbde906 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -43,6 +43,7 @@ RDEPEND=
 DEPEND=${RDEPEND}
=sys-devel/bison-1.875
=sys-devel/flex-2.5.4
+   doc? ( =app-doc/doxygen-1.7 )
nls? ( sys-devel/gettext )
test? (
=dev-util/dejagnu-1.4.4



[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/files/, sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 312bd3143a3842f072d096dbda4af9ee9a127ca7
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Tue Dec  2 22:38:53 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Tue Dec  2 22:38:53 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=312bd314

sys-devel/gcc: Complete install (hopefully).

Package-Manager: portage-2.2.14

---
 .../gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch|  21 ++
 sys-devel/gcc/gcc-4.9.2-r100.ebuild| 250 +
 2 files changed, 233 insertions(+), 38 deletions(-)

diff --git a/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch 
b/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch
new file mode 100644
index 000..11c3731
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch
@@ -0,0 +1,21 @@
+diff -urN gcc-4.6.4/libgcc/Makefile.in gcc-4.6.4-fixed/libgcc/Makefile.in
+--- gcc-4.6.4/libgcc/Makefile.in   2013-04-24 00:12:29.213242770 +
 gcc-4.6.4-fixed/libgcc/Makefile.in 2013-04-24 01:19:14.909313041 +
+@@ -945,7 +945,7 @@
+ 
+   $(subst @multilib_dir@,$(MULTIDIR),$(subst \
+   @shlib_base_name@,libunwind,$(subst \
+-  @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIBUNWIND_INSTALL
++  @shlib_slibdir_qual@,$(MULTISUBDIR),$(SHLIBUNWIND_INSTALL
+ 
+ install-shared:
+   $(mkinstalldirs) $(DESTDIR)$(inst_libdir)
+@@ -956,7 +956,7 @@
+ 
+   $(subst @multilib_dir@,$(MULTIDIR),$(subst \
+   @shlib_base_name@,libgcc_s,$(subst \
+-  @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(SHLIB_INSTALL
++  @shlib_slibdir_qual@,$(MULTISUBDIR),$(SHLIB_INSTALL
+ 
+ install-leaf: $(install-shared) $(install-libunwind)
+   $(mkinstalldirs) $(DESTDIR)$(inst_libdir)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index bbde906..6f6d359 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -63,6 +63,9 @@ REQUIRED_USE=
pie? ( !vanilla )
ssp? ( !vanilla )
 
+# Custom magic.
+RESTRICT=strip
+
 pkg_setup() {
export CTARGET=${CTARGET:-${CHOST}}
 
@@ -102,13 +105,16 @@ setup_multilib_osdirnames() {
 src_prepare() {
export BRANDING_GCC_PKGVERSION=Gentoo ${PVR}::mgorny
 
-   if has_version 'sys-libs/glibc-2.12' ; then
-   ewarn Your host glibc is too old; disabling automatic fortify.
-   ewarn Please rebuild gcc after upgrading to =glibc-2.12 
#362315
-   rm ${WORKDIR}/patch/10_all_default-fortify-source.patch || die
-   fi
+   # fix libgcc_s install path
+   epatch ${FILESDIR}/gcc-4.6.4-fix-libgcc-s-path-with-vsrl.patch || die
 
if ! use vanilla; then
+   if has_version 'sys-libs/glibc-2.12' ; then
+   ewarn Your host glibc is too old; disabling automatic 
fortify.
+   ewarn Please rebuild gcc after upgrading to 
=glibc-2.12 #362315
+   rm 
${WORKDIR}/patch/10_all_default-fortify-source.patch || die
+   fi
+
BRANDING_GCC_PKGVERSION+= p${PATCH_VER}
 
einfo Applying Gentoo patches ...
@@ -184,12 +190,12 @@ src_configure() {
einfo CXXFLAGS: ${CXXFLAGS}
einfo LDFLAGS: ${LDFLAGS}
 
-   local prefix=/usr
-   local binpath=${prefix}/${CTARGET}/gcc-bin/${PV}
-   local libpath=${prefix}/lib/gcc/${CTARGET}/${PV}
-   local incpath=${libpath}/include
-   local datapath=${prefix}/share/gcc-data/${CTARGET}/${PV}
-   local stdcxx_incdir=${libpath}/include/g++-v${GCC_BRANCH_VER%%.*}
+   PREFIX=/usr
+   BINPATH=${PREFIX}/${CTARGET}/gcc-bin/${PV}
+   LIBPATH=${PREFIX}/lib/gcc/${CTARGET}/${PV}
+   INCPATH=${LIBPATH}/include
+   DATAPATH=${PREFIX}/share/gcc-data/${CTARGET}/${PV}
+   STDCXX_INCDIR=${LIBPATH}/include/g++-v${GCC_BRANCH_VER%%.*}
 
local langs=( c )
use cxx  langs+=( c++ )
@@ -203,18 +209,19 @@ src_configure() {
--host=${CHOST}
--build=${CBUILD:-${CHOST}}
 
-   --prefix=${prefix}
-   --bindir=${binpath}
-   --includedir=${incpath}
-   --datadir=${datapath}
-   --mandir=${datapath}/man
-   --infodir=${datapath}/info
-   --with-gxx-include-dir=${stdcxx_incdir}
-   --with-python-dir=${datapath#${prefix}/}/python
+   --prefix=${PREFIX}
+   --bindir=${BINPATH}
+   --includedir=${INCPATH}
+   --datadir=${DATAPATH}
+   --mandir=${DATAPATH}/man
+   --infodir=${DATAPATH}/info
+   --with-gxx-include-dir=${STDCXX_INCDIR}
+   --with-python-dir=${DATAPATH#${PREFIX}/}/python
 
--enable-languages=${langs// /,}
--disable-libgcj
 
+   

[gentoo-commits] dev/mgorny:master commit in: sys-devel/gcc/

2014-12-04 Thread Michał Górny
commit: 5174c8c5cefc29026932769f944d1de86bed805e
Author: Michał Górny mgorny AT gentoo DOT org
AuthorDate: Wed Dec  3 22:05:52 2014 +
Commit: Michał Górny mgorny AT gentoo DOT org
CommitDate: Wed Dec  3 22:05:52 2014 +
URL:
http://sources.gentoo.org/gitweb/?p=dev/mgorny.git;a=commit;h=5174c8c5

sys-devel/gcc: Remove USE=ssp, fix hardened env install.

Package-Manager: portage-2.2.14

---
 sys-devel/gcc/gcc-4.9.2-r100.ebuild | 34 +-
 sys-devel/gcc/metadata.xml  |  1 -
 2 files changed, 13 insertions(+), 22 deletions(-)

diff --git a/sys-devel/gcc/gcc-4.9.2-r100.ebuild 
b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
index cb81f0a..3ef83c8 100644
--- a/sys-devel/gcc/gcc-4.9.2-r100.ebuild
+++ b/sys-devel/gcc/gcc-4.9.2-r100.ebuild
@@ -27,7 +27,7 @@ SLOT=${PV%.*}
 KEYWORDS=~amd64 ~x86
 IUSE=abi_x86_32 abi_x86_64 abi_x86_x32
altivec +cxx doc fixed-point +fortran go graphite hardened libssp
-   multilib +nls +nptl objc objc-gc objc++ +openmp +pie +sanitize +ssp
+   multilib +nls +nptl objc objc-gc objc++ +openmp +pie +sanitize
test vanilla
 
 RDEPEND=
@@ -59,10 +59,9 @@ PDEPEND=elibc_glibc? ( =sys-libs/glibc-2.8 )
 REQUIRED_USE=
doc? ( cxx )
go? ( cxx )
-   hardened? ( pie ssp )
+   hardened? ( pie !vanilla )
objc++? ( cxx )
-   pie? ( !vanilla )
-   ssp? ( !vanilla )
+   pie? ( !vanilla )
 
 # Custom magic.
 RESTRICT=strip
@@ -515,22 +514,6 @@ create_gcc_env_entry() {
EOF
 }
 
-copy_minispecs_gcc_specs() {
-   # setup the hardenedno* specs files and the vanilla specs file.
-   if hardened_gcc_works ; then
-   create_gcc_env_entry hardenednopiessp
-   fi
-   if hardened_gcc_works pie ; then
-   create_gcc_env_entry hardenednopie
-   fi
-   if hardened_gcc_works ssp ; then
-   create_gcc_env_entry hardenednossp
-   fi
-   create_gcc_env_entry vanilla
-   insinto ${LIBPATH}
-   doins ${WORKDIR}/specs/*.specs
-}
-
 src_install() {
cd ${WORKDIR}/build || die
 
@@ -576,8 +559,17 @@ src_install() {
 
prune_libtool_files
 
+   # entries and specs
create_gcc_env_entry
-   use hardened  copy_minispecs_gcc_specs
+   if use hardened; then
+   # setup the hardenedno* specs files and the vanilla specs file.
+   create_gcc_env_entry hardenednopiessp
+   create_gcc_env_entry hardenednopie
+   create_gcc_env_entry hardenednossp
+   create_gcc_env_entry vanilla
+   insinto ${LIBPATH}
+   doins ${WORKDIR}/specs/*.specs
+   fi
 }
 
 switch_gcc() {

diff --git a/sys-devel/gcc/metadata.xml b/sys-devel/gcc/metadata.xml
index 313c609..0a0abbb 100644
--- a/sys-devel/gcc/metadata.xml
+++ b/sys-devel/gcc/metadata.xml
@@ -14,7 +14,6 @@
flag name=libsspBuild SSP support into a dedicated library 
rather than use the
code in the C library (DO NOT ENABLE THIS IF YOU DON'T 
KNOW WHAT IT DOES)/flag
flag name=pieEnable PIE support (DO NOT DISABLE)/flag
-   flag name=sspEnable SSP support (DO NOT DISABLE)/flag
flag name=objcBuild support for the Objective C code 
language/flag
flag name=objc++Build support for the Objective C++ 
language/flag
flag name=objc-gcBuild support for the Objective C code 
language Garbage