summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhasufell <julian.ospald@googlemail.com>2011-12-23 01:05:15 +0000
committerhasufell <julian.ospald@googlemail.com>2011-12-23 01:05:15 +0000
commit3a8a9c0b9f3c9a44bd56e9eec18b798f8e144eeb (patch)
tree3f690fbe6e08d5cd33541d674516b6fa002bb70d /dev-lang
parentmedia-libs/hdj_mod: New Ebuild for bug 272100 Thanks Tommy[D] and Floppym. (diff)
downloadsunrise-3a8a9c0b9f3c9a44bd56e9eec18b798f8e144eeb.tar.gz
sunrise-3a8a9c0b9f3c9a44bd56e9eec18b798f8e144eeb.tar.bz2
sunrise-3a8a9c0b9f3c9a44bd56e9eec18b798f8e144eeb.zip
dev-lang/dmd: New Ebuild for bug 395415
svn path=/sunrise/; revision=12598
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/dmd/ChangeLog7
-rw-r--r--dev-lang/dmd/Manifest9
-rw-r--r--dev-lang/dmd/dmd-1.066.ebuild103
-rw-r--r--dev-lang/dmd/files/dmd-1.066-makefile.patch665
-rw-r--r--dev-lang/dmd/files/slot-compat.patch11
-rw-r--r--dev-lang/dmd/files/stackelf.patch63
-rw-r--r--dev-lang/dmd/metadata.xml8
7 files changed, 863 insertions, 3 deletions
diff --git a/dev-lang/dmd/ChangeLog b/dev-lang/dmd/ChangeLog
index 08df377d8..ad571eb6a 100644
--- a/dev-lang/dmd/ChangeLog
+++ b/dev-lang/dmd/ChangeLog
@@ -2,6 +2,13 @@
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*dmd-1.066 (23 Dec 2011)
+
+ 23 Dec 2011; hasufell <julian.ospald@googlemail.com> +dmd-1.066.ebuild,
+ +files/dmd-1.066-makefile.patch, +files/slot-compat.patch,
+ +files/stackelf.patch, metadata.xml:
+ New Ebuild for bug 395415
+
19 Dec 2011; Marco Leise <marco.leise@gmx.de> -dmd-2.054-r1.ebuild,
-files/dmd-2.054-makefile.patch, -files/dmd-2.054-no-execstack.patch,
+dmd-2.057.ebuild, +files/dmd-2.057-makefile.patch, files/dmd.bashcomp:
diff --git a/dev-lang/dmd/Manifest b/dev-lang/dmd/Manifest
index aaf18d9bc..97eec8ca3 100644
--- a/dev-lang/dmd/Manifest
+++ b/dev-lang/dmd/Manifest
@@ -1,12 +1,17 @@
+AUX dmd-1.066-makefile.patch 16530 RMD160 b7196c46933dc0493a69340743fa74cbe48da20b SHA1 65960f6613393f35366da80767f39625eda246eb SHA256 df0c6db1578747b9cc5bbc9ccb14ab53599d7e2456d68f60d40ee98daa61dbb6
AUX dmd-2.055-makefile.patch 2707 RMD160 68b07ed19b1e191c7820b7ef85cc4c4eff2c3f64 SHA1 11607841bd7caebc277e8bb4ce2a08e345ae7157 SHA256 532631f7f295dc722783f7d48208bd37981e81f18163a086ae78a5760970b477
AUX dmd-2.056-makefile.patch 2707 RMD160 68b07ed19b1e191c7820b7ef85cc4c4eff2c3f64 SHA1 11607841bd7caebc277e8bb4ce2a08e345ae7157 SHA256 532631f7f295dc722783f7d48208bd37981e81f18163a086ae78a5760970b477
AUX dmd-2.057-makefile.patch 2727 RMD160 64d9ea8c7172e6297d4f76bf92a9b274b922882f SHA1 4cee7d9ae5a582b6af4e76a23feec47404447ee0 SHA256 54d25d5715457b90908f6d9642cd10c23f56fa9a9f1db7874b08a69a209d7a5a
AUX dmd.bashcomp 4486 RMD160 9d68ac6e7df0d6698decbcdf49b6b1625aa05546 SHA1 06fc9eb9e9a9070e5e0a13c046abfc5648319b34 SHA256 b679b0c676035eda48948eeb6c2a8184c6effdc97d8c98d1ca4b071f345e4ac6
+AUX slot-compat.patch 376 RMD160 f8a2770f6994ebf056e40bbb6ecc6fd3cbec798e SHA1 6e25821964199378f568c601bbdf18c2ad1d7d00 SHA256 d9f1f19b158c3cc52e133751e834460b12a0fa003192d50ba40421bf9ff56763
+AUX stackelf.patch 3527 RMD160 efa17b66952649e0fa64bb7fe73f58f7c01c6d4d SHA1 e723fefaaaa35122cc45b3882cea17b499fc9926 SHA256 56835f1bb5b5f33edbb2bdf650bdb9e459f3670db205b2aeb0a367a868517a96
+DIST dmd.1.066.zip 8958349 RMD160 c65c32750b1bce9192d955f392de70ddf9667023 SHA1 9197d0a4ffda2021e860396e9a1c7f9225b678d8 SHA256 26c421fdeaa3f81397cb9be858b8829eb01ebe11d6874c133b2ba2de249775fb
DIST dmd.2.055.zip 17137571 RMD160 c418324817e7d44bc76468e6d5e79089c82ca367 SHA1 13fb220db783cb47ad4cf3614d389894e92745c6 SHA256 11901f541ab3cce2ea245c1f609f456996eab1922c976483750c90d99c49816b
DIST dmd.2.056.zip 19678819 RMD160 d323972e326c113b8976a494d783389f8999c34a SHA1 1b0c80c1415b9fb22e992c6c8dcb5b40674cccfb SHA256 22aea9e97f271cf64fbcb71458fa3454b6eef4bb5a2ed7061f753a4e91c9f515
DIST dmd.2.057.zip 21798644 RMD160 e1d5e80c935123373a2fc037cc6118bc12e0503b SHA1 8b3124206669c7285b8081aa745187e27d3d01c7 SHA256 424878440f36a74a31486dd69ef154cc938307ae78b25b7fa4a9296c54436d1b
+EBUILD dmd-1.066.ebuild 2252 RMD160 70fe6d6bfb5ccba7018a0665364e58f5f5fa0296 SHA1 c061eff99d6df75234439ea49d7ad4cfffd5f9fe SHA256 36f7f66aca610cbd15c22d8f1da4b99eea5f506c5fabc84b161a07b90683d889
EBUILD dmd-2.055-r1.ebuild 3963 RMD160 f857cc63b917b154510687edb33fa8d9d6dcaa3e SHA1 fbcb3f0fc0e2bc907e059e9b884d88e77ce797be SHA256 61d094d8fdce5606d471321f50ac1879066485f597bd5ab5227e8b0ca10fe0a4
EBUILD dmd-2.056.ebuild 3963 RMD160 f857cc63b917b154510687edb33fa8d9d6dcaa3e SHA1 fbcb3f0fc0e2bc907e059e9b884d88e77ce797be SHA256 61d094d8fdce5606d471321f50ac1879066485f597bd5ab5227e8b0ca10fe0a4
EBUILD dmd-2.057.ebuild 3963 RMD160 f857cc63b917b154510687edb33fa8d9d6dcaa3e SHA1 fbcb3f0fc0e2bc907e059e9b884d88e77ce797be SHA256 61d094d8fdce5606d471321f50ac1879066485f597bd5ab5227e8b0ca10fe0a4
-MISC ChangeLog 1183 RMD160 3317063ceb19733b159f509ae46bce8aadb5067e SHA1 968a42c484024b25b2c0c1a96bcb783800f52820 SHA256 d14824205a47ca78ede4c06f4e57cdbac42f3af89ca3ca877399a84616f093be
-MISC metadata.xml 208 RMD160 c18611400760e42bdd001905be0a63c2e963bcea SHA1 595816105cac477cb85792a182e15888029118a1 SHA256 c4841c87f0c2b9b5e679a27dc72180be8d508fb3f5df0fbab2ec2c805c0a6d82
+MISC ChangeLog 1412 RMD160 d6ba6edc9607e55640dacc9898dcf785a16d45cf SHA1 b290dd92b4a9c38ccf737ebac095e580dff738fc SHA256 98b847fd4ced2940deebedde40d8d617eca4cca138befdf778904d02e474d19d
+MISC metadata.xml 332 RMD160 c37d44264a461109c3140ee764a96c40dd8c9826 SHA1 355e7fdc8d61d7b156ebe27f05ba184b64438e18 SHA256 ca3965824cec545a7ba488604bd8ac54a80035fe1b17d3984e4bcc454d60fbe6
diff --git a/dev-lang/dmd/dmd-1.066.ebuild b/dev-lang/dmd/dmd-1.066.ebuild
new file mode 100644
index 000000000..070d101b1
--- /dev/null
+++ b/dev-lang/dmd/dmd-1.066.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils multilib flag-o-matic
+
+MY_P=${P/-/.}
+
+DESCRIPTION="Digital Mars D Compiler"
+HOMEPAGE="http://www.digitalmars.com/d/"
+SRC_URI="http://ftp.digitalmars.com/${MY_P}.zip"
+
+# License doesn't allow redistribution
+LICENSE="DMD"
+RESTRICT="mirror"
+SLOT="1"
+KEYWORDS="~amd64"
+IUSE="tools"
+
+DEPEND="sys-apps/findutils
+ app-arch/unzip"
+RDEPEND=""
+
+S="${WORKDIR}/dmd"
+
+src_prepare() {
+ # remove unnecessary files
+ rm -r freebsd html osx linux/lib/* \
+ linux/bin/{README.TXT,dmd,dmd.conf} windows \
+ samples README.TXT license.txt || die "something went wrong"
+
+ cd "${S}"/src
+
+ # patch for slot-compatibility
+ epatch "${FILESDIR}/slot-compat.patch"
+ # patch for makefile
+ epatch "${FILESDIR}/${P}-makefile.patch"
+ # fix stack elf
+ epatch "${FILESDIR}/stackelf.patch"
+
+ append-ldflags $(no-as-needed)
+}
+
+src_compile() {
+ cd "${S}"/src/dmd
+
+ # make dmd
+ emake -f linux.mak
+ cp dmd idgen impcnvgen optabgen "${S}"/linux/bin || die "failed"
+ fperms guo=rx ../../linux/bin/dmd
+
+ # make phobos
+ cd "${S}"/src/phobos
+ # zlib 1.2.5 will be statically linked
+ emake -j1 -f linux.mak "DMD="${S}"/linux/bin/dmd"
+ cp libphobos.a "${S}"/linux/lib || die "failed"
+
+ # Clean up
+ emake -f linux.mak clean
+ find "${S}" \( -name "*.c" -o -name "*.h" -o -name "*.mak" -o -name "*.txt" \
+ -o -name "*.obj" -o -name "*.ddoc" -o -name "*.asm" \) -exec rm -v {} \; || die "failed"
+}
+
+src_install() {
+ # Lib
+ dolib.a linux/lib/libphobos.a
+
+ # Install dmd compiler
+ newbin linux/bin/dmd dmd1
+
+ # Build new dmd1.conf
+ cat > dmd1.conf << END
+[Environment]
+DFLAGS=-I/usr/include/phobos1 -L-L/usr/$(get_libdir)
+END
+ insinto /etc
+ doins dmd1.conf
+
+ # Includes
+ insinto /usr/include/phobos1
+ doins -r src/phobos/*
+
+ # Man pages
+ newman man/man1/dmd.1 dmd1.1
+ newman man/man1/dmd.conf.5 dmd1.conf.5
+
+ if use tools; then
+ doman man/man1/dumpobj.1
+ doman man/man1/obj2asm.1
+ doman man/man1/rdmd.1
+
+ # Tools
+ dobin linux/bin/{dumpobj,obj2asm,rdmd}
+ fi
+}
+
+pkg_postinst () {
+ ewarn " "
+ ewarn "DMD1 uses "dmd1.conf", not "dmd.conf"! "
+ ewarn " "
+}
diff --git a/dev-lang/dmd/files/dmd-1.066-makefile.patch b/dev-lang/dmd/files/dmd-1.066-makefile.patch
new file mode 100644
index 000000000..8f8be25b7
--- /dev/null
+++ b/dev-lang/dmd/files/dmd-1.066-makefile.patch
@@ -0,0 +1,665 @@
+--- dmd/src/dmd/linux.mak.old 2010-12-17 19:11:16.000000000 +0100
++++ dmd/src/dmd/linux.mak 2011-12-22 22:33:15.713547884 +0100
+@@ -3,9 +3,10 @@
+ TK=tk
+ ROOT=root
+
+-MODEL=-m32
++MODEL?=32
+
+-CC=g++ $(MODEL)
++CC?=gcc
++CXX?=g++
+
+ #OPT=-g -g3
+ #OPT=-O2
+@@ -15,10 +16,12 @@
+ WARNINGS=-Wno-deprecated -Wstrict-aliasing
+
+ #GFLAGS = $(WARNINGS) -D__near= -D__pascal= -fno-exceptions -g -DDEBUG=1 $(COV)
+-GFLAGS = $(WARNINGS) -D__near= -D__pascal= -fno-exceptions -O2
+-
+-CFLAGS = $(GFLAGS) -I$(ROOT) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH
+-MFLAGS = $(GFLAGS) -I$C -I$(TK) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH
++DMDFLAGS=$(WARNINGS) -D__near= -D__pascal= -fno-exceptions
++ROOTFLAG=$(DMDFLAGS) -I$(ROOT) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH
++TKFLAG=$(DMDFLAGS) -I$C -I$(TK) -D__I86__=1 -DMARS=1 -DTARGET_LINUX=1 -D_DH
++CFLAGS+=-m$(MODEL)
++CXXFLAGS+=-m$(MODEL)
++LDFLAGS+=-lm -lstdc++ -lpthread
+
+ CH= $C/cc.h $C/global.h $C/parser.h $C/oper.h $C/code.h $C/type.h \
+ $C/dt.h $C/cgcv.h $C/el.h $C/iasm.h
+@@ -94,7 +97,7 @@
+ all: dmd
+
+ dmd: $(DMD_OBJS)
+- gcc $(MODEL) -lstdc++ -lpthread $(COV) $(DMD_OBJS) -o dmd
++ $(CC) $(CFLAGS) $(LDFLAGS) $(COV) $(DMD_OBJS) -o dmd
+
+ clean:
+ rm -f $(DMD_OBJS) dmd optab.o id.o impcnvgen idgen id.c id.h \
+@@ -105,7 +108,7 @@
+ ######## optabgen generates some source
+
+ optabgen: $C/optabgen.c $C/cc.h $C/oper.h
+- $(CC) $(MFLAGS) $< -o optabgen
++ $(CXX) $(CXXFLAGS) $(TKFLAG) $< -o optabgen
+ ./optabgen
+
+ optabgen_output = debtab.c optab.c cdxxx.c elxxx.c fltables.c tytab.c
+@@ -117,7 +120,7 @@
+ $(idgen_output) : idgen
+
+ idgen : idgen.c
+- $(CC) idgen.c -o idgen
++ $(CXX) $(CXXFLAGS) idgen.c -o idgen
+ ./idgen
+
+ ######### impcnvgen generates some source
+@@ -126,7 +129,7 @@
+ $(impcnvtab_output) : impcnvgen
+
+ impcnvgen : mtype.h impcnvgen.c
+- $(CC) $(CFLAGS) impcnvgen.c -o impcnvgen
++ $(CXX) $(CXXFLAGS) $(ROOTFLAG) impcnvgen.c -o impcnvgen
+ ./impcnvgen
+
+ #########
+@@ -134,397 +137,397 @@
+ $(DMD_OBJS) : $(idgen_output) $(optabgen_output) $(impcnvgen_output)
+
+ aa.o: $C/aa.h $C/tinfo.h $C/aa.c
+- $(CC) -c $(MFLAGS) -I. $C/aa.c
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) -I. $C/aa.c
+
+ aav.o: $(ROOT)/aav.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ access.o: access.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ aliasthis.o: aliasthis.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ argtypes.o: argtypes.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ array.o: $(ROOT)/array.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ arrayop.o: arrayop.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ async.o: $(ROOT)/async.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ attrib.o: attrib.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ bcomplex.o: $C/bcomplex.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ bit.o: expression.h bit.c
+- $(CC) -c -I$(ROOT) $(MFLAGS) bit.c
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $(TKFLAG) bit.c
+
+ blockopt.o: $C/blockopt.c
+- $(CC) -c $(MFLAGS) $C/blockopt.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/blockopt.c
+
+ builtin.o: builtin.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ cast.o: cast.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ cg.o: fltables.c $C/cg.c
+- $(CC) -c $(MFLAGS) -I. $C/cg.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I. $C/cg.c
+
+ cg87.o: $C/cg87.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ cgcod.o: $C/cgcod.c
+- $(CC) -c $(MFLAGS) -I. $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I. $<
+
+ cgcs.o: $C/cgcs.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ cgcv.o: $C/cgcv.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ cgelem.o: $C/rtlsym.h $C/cgelem.c
+- $(CC) -c $(MFLAGS) -I. $C/cgelem.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I. $C/cgelem.c
+
+ cgen.o: $C/rtlsym.h $C/cgen.c
+- $(CC) -c $(MFLAGS) $C/cgen.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/cgen.c
+
+ cgobj.o: $C/cgobj.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ cgreg.o: $C/cgreg.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ cgsched.o: $C/rtlsym.h $C/cgsched.c
+- $(CC) -c $(MFLAGS) $C/cgsched.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/cgsched.c
+
+ class.o: class.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ clone.o: clone.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ cod1.o: $C/rtlsym.h $C/cod1.c
+- $(CC) -c $(MFLAGS) $C/cod1.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/cod1.c
+
+ cod2.o: $C/rtlsym.h $C/cod2.c
+- $(CC) -c $(MFLAGS) $C/cod2.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/cod2.c
+
+ cod3.o: $C/rtlsym.h $C/cod3.c
+- $(CC) -c $(MFLAGS) $C/cod3.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/cod3.c
+
+ cod4.o: $C/cod4.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ cod5.o: $C/cod5.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ code.o: $C/code.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ constfold.o: constfold.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ irstate.o: irstate.h irstate.c
+- $(CC) -c $(MFLAGS) -I$(ROOT) irstate.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I$(ROOT) irstate.c
+
+ csymbol.o : $C/symbol.c
+- $(CC) -c $(MFLAGS) $C/symbol.c -o csymbol.o
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/symbol.c -o csymbol.o
+
+ dchar.o: $(ROOT)/dchar.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ cond.o: cond.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ cppmangle.o: cppmangle.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ debug.o: $C/debug.c
+- $(CC) -c $(MFLAGS) -I. $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I. $<
+
+ declaration.o: declaration.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ delegatize.o: delegatize.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ doc.o: doc.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ dsymbol.o: dsymbol.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ dt.o: $C/dt.h $C/dt.c
+- $(CC) -c $(MFLAGS) $C/dt.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/dt.c
+
+ dump.o: dump.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ dwarf.o: $C/dwarf.h $C/dwarf.c
+- $(CC) -c $(MFLAGS) -I. $C/dwarf.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I. $C/dwarf.c
+
+ e2ir.o: $C/rtlsym.h expression.h toir.h e2ir.c
+- $(CC) -c -I$(ROOT) $(MFLAGS) e2ir.c
++ $(CXX) -c -I$(ROOT) $(CXXFLAGS) $(TKFLAG) e2ir.c
+
+ ee.o: $C/ee.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ eh.o : $C/cc.h $C/code.h $C/type.h $C/dt.h eh.c
+- $(CC) -c $(MFLAGS) eh.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) eh.c
+
+ el.o: $C/rtlsym.h $C/el.h $C/el.c
+- $(CC) -c $(MFLAGS) $C/el.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/el.c
+
+ elfobj.o: $C/elfobj.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ entity.o: entity.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ enum.o: enum.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ evalu8.o: $C/evalu8.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ expression.o: expression.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ func.o: func.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ gdag.o: $C/gdag.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ gflow.o: $C/gflow.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ #globals.o: globals.c
+-# $(CC) -c $(CFLAGS) $<
++# $(CXX) -c $(CXXFLAGS) $<
+
+ glocal.o: $C/rtlsym.h $C/glocal.c
+- $(CC) -c $(MFLAGS) $C/glocal.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/glocal.c
+
+ gloop.o: $C/gloop.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ glue.o: $(CH) $(TOTALH) $C/rtlsym.h mars.h module.h glue.c
+- $(CC) -c $(MFLAGS) -I$(ROOT) glue.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I$(ROOT) glue.c
+
+ gnuc.o: $(ROOT)/gnuc.h $(ROOT)/gnuc.c
+- $(CC) -c $(GFLAGS) $(ROOT)/gnuc.c
++ $(CXX) -c $(CXXFLAGS) $(ROOT)/gnuc.c
+
+ go.o: $C/go.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ gother.o: $C/gother.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ hdrgen.o: hdrgen.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ html.o: $(CH) $(TOTALH) $C/html.h $C/html.c
+- $(CC) -c -I$(ROOT) $(MFLAGS) $C/html.c
++ $(CXX) -c -I$(ROOT) $(CXXFLAGS) $(TKFLAG) $C/html.c
+
+ iasm.o : $(CH) $(TOTALH) $C/iasm.h iasm.c
+- $(CC) -c $(MFLAGS) -I$(ROOT) iasm.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I$(ROOT) iasm.c
+
+ id.o : id.h id.c
+- $(CC) -c $(CFLAGS) id.c
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) id.c
+
+ identifier.o: identifier.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ impcnvtab.o: mtype.h impcnvtab.c
+- $(CC) -c $(CFLAGS) -I$(ROOT) impcnvtab.c
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) -I$(ROOT) impcnvtab.c
+
+ imphint.o: imphint.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ import.o: import.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ inifile.o: inifile.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ init.o: init.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ inline.o: inline.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ interpret.o: interpret.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ json.o: json.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ lexer.o: lexer.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ libelf.o: libelf.c $C/melf.h
+- $(CC) -c $(CFLAGS) -I$C $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) -I$C $<
+
+ libmach.o: libmach.c $C/mach.h
+- $(CC) -c $(CFLAGS) -I$C $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) -I$C $<
+
+ link.o: link.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ lstring.o: $(ROOT)/lstring.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ machobj.o: $C/machobj.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ macro.o: macro.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ man.o: $(ROOT)/man.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ mangle.o: mangle.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ mars.o: mars.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ rmem.o: $(ROOT)/rmem.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $(ROOT)/rmem.c
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $(ROOT)/rmem.c
+
+ module.o: $(TOTALH) $C/html.h module.c
+- $(CC) -c $(CFLAGS) -I$C module.c
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) -I$C module.c
+
+ msc.o: $(CH) mars.h msc.c
+- $(CC) -c $(MFLAGS) msc.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) msc.c
+
+ mtype.o: mtype.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ nteh.o: $C/rtlsym.h $C/nteh.c
+- $(CC) -c $(MFLAGS) $C/nteh.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/nteh.c
+
+ opover.o: opover.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ optimize.o: optimize.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ os.o: $C/os.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ out.o: $C/out.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ outbuf.o : $C/outbuf.h $C/outbuf.c
+- $(CC) -c $(MFLAGS) $C/outbuf.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/outbuf.c
+
+ parse.o: parse.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ ph.o: ph.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ port.o: $(ROOT)/port.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ ptrntab.o: $C/iasm.h $C/ptrntab.c
+- $(CC) -c $(MFLAGS) $C/ptrntab.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/ptrntab.c
+
+ response.o: $(ROOT)/response.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ root.o: $(ROOT)/root.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ rtlsym.o: $C/rtlsym.h $C/rtlsym.c
+- $(CC) -c $(MFLAGS) $C/rtlsym.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/rtlsym.c
+
+ s2ir.o : $C/rtlsym.h statement.h s2ir.c
+- $(CC) -c -I$(ROOT) $(MFLAGS) s2ir.c
++ $(CXX) -c -I$(ROOT) $(CXXFLAGS) $(TKFLAG) s2ir.c
+
+ scope.o: scope.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ speller.o: $(ROOT)/speller.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ statement.o: statement.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ staticassert.o: staticassert.h staticassert.c
+- $(CC) -c $(CFLAGS) staticassert.c
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) staticassert.c
+
+ stringtable.o: $(ROOT)/stringtable.c
+- $(CC) -c $(GFLAGS) -I$(ROOT) $<
++ $(CXX) -c $(CXXFLAGS) -I$(ROOT) $<
+
+ strtold.o: $C/strtold.c
+- gcc $(MODEL) -c $C/strtold.c
++ $(CC) -c $(CFLAGS) $C/strtold.c
+
+ struct.o: struct.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ template.o: template.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ ti_achar.o: $C/tinfo.h $C/ti_achar.c
+- $(CC) -c $(MFLAGS) -I. $C/ti_achar.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I. $C/ti_achar.c
+
+ tk.o: tk.c
+- $(CC) -c $(MFLAGS) tk.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) tk.c
+
+ tocsym.o: $(CH) $(TOTALH) mars.h module.h tocsym.c
+- $(CC) -c $(MFLAGS) -I$(ROOT) tocsym.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I$(ROOT) tocsym.c
+
+ toctype.o: $(CH) $(TOTALH) $C/rtlsym.h mars.h module.h toctype.c
+- $(CC) -c $(MFLAGS) -I$(ROOT) toctype.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I$(ROOT) toctype.c
+
+ todt.o : mtype.h expression.h $C/dt.h todt.c
+- $(CC) -c -I$(ROOT) $(MFLAGS) todt.c
++ $(CXX) -c -I$(ROOT) $(CXXFLAGS) $(TKFLAG) todt.c
+
+ toelfdebug.o: $(CH) $(TOTALH) mars.h toelfdebug.c
+- $(CC) -c $(MFLAGS) -I$(ROOT) toelfdebug.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I$(ROOT) toelfdebug.c
+
+ toir.o: $C/rtlsym.h expression.h toir.h toir.c
+- $(CC) -c -I$(ROOT) $(MFLAGS) toir.c
++ $(CXX) -c -I$(ROOT) $(CXXFLAGS) $(TKFLAG) toir.c
+
+ toobj.o: $(CH) $(TOTALH) mars.h module.h toobj.c
+- $(CC) -c $(MFLAGS) -I$(ROOT) toobj.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I$(ROOT) toobj.c
+
+ traits.o: $(TOTALH) traits.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ type.o: $C/type.c
+- $(CC) -c $(MFLAGS) $C/type.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $C/type.c
+
+ typinf.o: $(CH) $(TOTALH) mars.h module.h mtype.h typinf.c
+- $(CC) -c $(MFLAGS) -I$(ROOT) typinf.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I$(ROOT) typinf.c
+
+ util.o: util.c
+- $(CC) -c $(MFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) $<
+
+ utf.o: utf.h utf.c
+- $(CC) -c $(CFLAGS) utf.c
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) utf.c
+
+ unialpha.o: unialpha.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ unittests.o: unittests.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ var.o: $C/var.c optab.c
+- $(CC) -c $(MFLAGS) -I. $C/var.c
++ $(CXX) -c $(CXXFLAGS) $(TKFLAG) -I. $C/var.c
+
+ version.o: version.c
+- $(CC) -c $(CFLAGS) $<
++ $(CXX) -c $(CXXFLAGS) $(ROOTFLAG) $<
+
+ ######################################################
+
+--- dmd/src/phobos/linux.mak.old 2010-12-17 19:11:16.000000000 +0100
++++ dmd/src/phobos/linux.mak 2011-12-22 22:33:20.388836783 +0100
+@@ -12,15 +12,17 @@
+ LIB=libphobos.a
+
+ MAKEFILE=linux.mak
+-MODEL=32
++MODEL?=32
+
+-CFLAGS=-O -m$(MODEL)
++CFLAGS+=-m$(MODEL)
++CXXFLAGS+=-m$(MODEL)
+ #CFLAGS=-g -m$(MODEL)
+
+ DFLAGS=-O -release -w -m$(MODEL)
+ #DFLAGS=-unittest -w -m$(MODEL)
+
+-CC=gcc
++CC?=gcc
++CXX?=g++
+ #DMD=/dmd/bin/dmd
+ DMD=dmd
+
+@@ -30,13 +32,13 @@
+ $(CC) -c $(CFLAGS) $*.c
+
+ .cpp.o:
+- g++ -c $(CFLAGS) $*.cpp
++ $(CXX) -c $(CXXFLAGS) $*.cpp
+
+ .d.o:
+ $(DMD) -c $(DFLAGS) $*.d
+
+ .asm.o:
+- $(CC) -c $*.asm
++ $(CC) $(CFLAGS) -c $*.asm
+
+ targets : $(LIB)
+
+@@ -44,7 +46,7 @@
+ $(DMD) -c test -g
+
+ test : test.o $(LIB)
+- $(CC) -o $@ test.o $(LIB) -lpthread -lm -g
++ $(CC) $(CFLAGS) -o $@ test.o $(LIB) -lpthread -lm -g
+
+ OBJS = complex.o gcstats.o \
+ critical.o object.o monitor.o \
+--- dmd/src/phobos/internal/gc/linux.mak.old 2010-12-17 19:11:16.000000000 +0100
++++ dmd/src/phobos/internal/gc/linux.mak 2011-12-22 23:59:59.328158400 +0100
+@@ -1,14 +1,14 @@
+
+ # makefile to build linux D garbage collector
+
+-MODEL=32
++MODEL?=32
+ #DMD=../../../dmd
+ DMD=dmd
+-CFLAGS=-g -m$(MODEL)
++CFLAGS+=-g -m$(MODEL)
+ #DFLAGS=-unittest -g -release
+ DFLAGS=-release -O -inline -m$(MODEL) -I../..
+ #DFLAGS=-release -inline -O
+-CC=gcc
++CC?=gcc
+ MAKEFILE=linux.mak
+
+ OBJS= gc.o gcx.o gcbits.o gclinux.o gcold.o
diff --git a/dev-lang/dmd/files/slot-compat.patch b/dev-lang/dmd/files/slot-compat.patch
new file mode 100644
index 000000000..8a9075877
--- /dev/null
+++ b/dev-lang/dmd/files/slot-compat.patch
@@ -0,0 +1,11 @@
+--- dmd/mars.c.old 2010-12-17 19:11:16.000000000 +0100
++++ dmd/mars.c 2011-12-20 22:06:56.120581188 +0100
+@@ -405,7 +405,7 @@
+ #if _WIN32
+ inifilename = inifile(argv[0], "sc.ini");
+ #elif linux || __APPLE__ || __FreeBSD__ || __sun&&__SVR4
+- inifilename = inifile(argv[0], "dmd.conf");
++ inifilename = inifile(argv[0], "dmd1.conf");
+ #else
+ #error "fix this"
+ #endif
diff --git a/dev-lang/dmd/files/stackelf.patch b/dev-lang/dmd/files/stackelf.patch
new file mode 100644
index 000000000..ed6ced401
--- /dev/null
+++ b/dev-lang/dmd/files/stackelf.patch
@@ -0,0 +1,63 @@
+--- dmd/src/dmd/backend/elfobj.c.old 2010-12-17 19:11:16.000000000 +0100
++++ dmd/src/dmd/backend/elfobj.c 2011-12-23 00:53:36.585240795 +0100
+@@ -652,7 +652,7 @@
+ if (I64)
+ {
+ static char section_names_init64[] =
+- "\0.symtab\0.strtab\0.shstrtab\0.text\0.data\0.bss\0.note\0.comment\0.rodata\0.rela.text\0.rela.data";
++ "\0.symtab\0.strtab\0.shstrtab\0.text\0.data\0.bss\0.note\0.comment\0.rodata\0.note.GNU-stack\0.rela.text\0.rela.data";
+ #define NAMIDX_NONE 0
+ #define NAMIDX_SYMTAB 1 // .symtab
+ #define NAMIDX_STRTAB 9 // .strtab
+@@ -663,9 +663,10 @@
+ #define NAMIDX_NOTE 44 // .note
+ #define NAMIDX_COMMENT 50 // .comment
+ #define NAMIDX_RODATA 59 // .rodata
+- #define NAMIDX_RELTEXT 67 // .rel.text and .rela.text
+- #define NAMIDX_RELDATA 77 // .rel.data
+- #define NAMIDX_RELDATA64 78 // .rela.data
++ #define NAMIDX_GNUSTACK 67 // .note.GNU-stack
++ #define NAMIDX_RELTEXT 83 // .rel.text and .rela.text
++ #define NAMIDX_RELDATA 93 // .rel.data
++ #define NAMIDX_RELDATA64 94 // .rela.data
+
+ if (section_names)
+ section_names->setsize(sizeof(section_names_init64));
+@@ -692,6 +693,7 @@
+ elf_newsection2(NAMIDX_SHSTRTAB,SHT_STRTAB, 0, 0,0,0,0,0, 1,0);
+ elf_newsection2(NAMIDX_COMMENT, SHT_PROGDEF,0, 0,0,0,0,0, 1,0);
+ elf_newsection2(NAMIDX_NOTE,SHT_NOTE, 0, 0,0,0,0,0, 1,0);
++ elf_newsection2(NAMIDX_GNUSTACK,SHT_PROGDEF,0, 0,0,0,0,0, 1,0);
+
+ IDXSTR namidx;
+ namidx = NAMIDX_TEXT; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
+@@ -705,11 +707,12 @@
+ namidx = NAMIDX_SHSTRTAB; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
+ namidx = NAMIDX_COMMENT; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
+ namidx = NAMIDX_NOTE; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
++ namidx = NAMIDX_GNUSTACK; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
+ }
+ else
+ {
+ static char section_names_init[] =
+- "\0.symtab\0.strtab\0.shstrtab\0.text\0.data\0.bss\0.note\0.comment\0.rodata\0.rel.text\0.rel.data";
++ "\0.symtab\0.strtab\0.shstrtab\0.text\0.data\0.bss\0.note\0.comment\0.rodata\0.note.GNU-stack\0.rel.text\0.rel.data";
+
+ if (section_names)
+ section_names->setsize(sizeof(section_names_init));
+@@ -736,6 +739,7 @@
+ elf_newsection2(NAMIDX_SHSTRTAB,SHT_STRTAB, 0, 0,0,0,0,0, 1,0);
+ elf_newsection2(NAMIDX_COMMENT, SHT_PROGDEF,0, 0,0,0,0,0, 1,0);
+ elf_newsection2(NAMIDX_NOTE,SHT_NOTE, 0, 0,0,0,0,0, 1,0);
++ elf_newsection2(NAMIDX_GNUSTACK,SHT_PROGDEF,0, 0,0,0,0,0, 1,0);
+
+ IDXSTR namidx;
+ namidx = NAMIDX_TEXT; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
+@@ -749,6 +753,7 @@
+ namidx = NAMIDX_SHSTRTAB; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
+ namidx = NAMIDX_COMMENT; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
+ namidx = NAMIDX_NOTE; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
++ namidx = NAMIDX_GNUSTACK; *(IDXSTR *)section_names_hashtable->get(&namidx) = namidx;
+ }
+
+ if (SYMbuf)
diff --git a/dev-lang/dmd/metadata.xml b/dev-lang/dmd/metadata.xml
index 31dc017fa..d96ab388b 100644
--- a/dev-lang/dmd/metadata.xml
+++ b/dev-lang/dmd/metadata.xml
@@ -1,5 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
-<maintainer><email>maintainer-wanted@gentoo.org</email></maintainer>
+<maintainer>
+ <email>maintainer-wanted@gentoo.org</email>
+</maintainer>
+
+<use>
+ <flag name='tools'>Install optional tools, leave disabled if you use "dmd-common" from d-overlay</flag>
+</use>
</pkgmetadata>