I think this is ready for inclusion. Nobody complained during my holiday, and I'm quite happy with it.
There's more work to be done in order to build GtkAda and others, but I'm looking for OKs on this diff first: (note: PARALLEL_INSTALL=No, the gnat part can't handle it) Index: 4.2/Makefile =================================================================== RCS file: /home/vcs/cvs/openbsd/ports/lang/gcc/4.2/Makefile,v retrieving revision 1.86 diff -u -p -r1.86 Makefile --- 4.2/Makefile 7 Oct 2012 20:09:44 -0000 1.86 +++ 4.2/Makefile 4 Nov 2012 19:43:18 -0000 @@ -7,10 +7,13 @@ DPB_PROPERTIES = parallel V = 4.2.4 FULL_VERSION = $V FULL_PKGVERSION = $V -BOOTSTRAP_GEN = 5 -# XXX adastrap bundles libc.so.60.1 (from OpenBSD 5.0) to build on i386 -LIBC_VERSION = 60.1 -ADASTRAP = adastrap-i386-$V-${BOOTSTRAP_GEN}.tgz + +ADASTRAP_LIBC-i386 = 60.1 +ADASTRAP-i386 = adastrap-i386-$V-5.tgz +ADASTRAP_LIBC-amd64 = 66.0 +ADASTRAP-amd64 = adastrap-amd64-$V-1.tgz +ADASTRAP_LIBC-sparc64 = 66.0 +ADASTRAP-sparc64 = adastrap-sparc64-$V-1.tgz PKGNAME-main = gcc-${FULL_PKGVERSION} PKGNAME-c++ = g++-${FULL_PKGVERSION} @@ -20,13 +23,13 @@ PKGNAME-java = gcj-${FULL_PKGVERSION} PKGNAME-objc = gobjc-${FULL_PKGVERSION} PKGNAME-ada = gnat-${FULL_PKGVERSION} -REVISION-main = 13 +REVISION-main = 14 REVISION-c++ = 17 REVISION-estdc = 5 REVISION-f95 = 15 REVISION-java = 15 REVISION-objc = 14 -REVISION-ada = 11 +REVISION-ada = 12 EPOCH = 0 SHARED_LIBS = estdc++ 13.0 \ @@ -48,7 +51,7 @@ USE_GROFF = Yes PSEUDO_FLAVORS = no_c++ no_f95 no_objc no_java no_ada full FLAVOR ?= -ONLY_FOR_ARCHS-ada = i386 +ONLY_FOR_ARCHS-ada = i386 amd64 sparc64 ONLY_FOR_ARCHS-java = amd64 sparc64 i386 MULTI_PACKAGES = -main -f95 -objc -java -c++ -estdc -ada @@ -61,7 +64,7 @@ BUILD_PACKAGES := ${BUILD_PACKAGES:N-est .endif DISTFILES = ${DISTNAME}.tar.bz2 -SUPDISTFILES = ${ADASTRAP}:0 +SUPDISTFILES = ${ADASTRAP-i386}:0 ${ADASTRAP-amd64}:0 ${ADASTRAP-sparc64}:0 BUILD_DEPENDS += devel/autoconf/2.59 BUILD_DEPENDS += devel/metaauto @@ -101,7 +104,7 @@ CONFIGURE_ARGS += --enable-libgcj .endif .if ${BUILD_PACKAGES:M-ada} LANGS := ${LANGS},ada -DISTFILES += ${ADASTRAP}:0 +DISTFILES += ${ADASTRAP-${MACHINE_ARCH}}:0 CONFIGURE_ENV = ADAC=${WRKDIR}/bin/egcc GNATBIND=${WRKDIR}/bin/gnatbind MAKE_ENV = ADAC=${WRKDIR}/bin/egcc GNATBIND=${WRKDIR}/bin/gnatbind CC = ${WRKDIR}/bin/egcc @@ -119,9 +122,6 @@ post-extract: .for l v in ${SHARED_LIBS} echo "LIB$l_LTVERSION = -version-info ${v:S/./:/}" >> ${WRKSRC}/libversions .endfor -.if ${BUILD_PACKAGES:M-ada} - ${WRKDIR}/bin/egcc -v # if this fails, you must extract suitable libraries from the relevant OpenBSD release or use the no_ada FLAVOR. -.endif post-install: .if ${BUILD_PACKAGES:M-ada} @@ -159,8 +159,8 @@ CONFIGURE_ARGS += \ # visible beast CONFIGURE_ARGS += --enable-cpp -CONFIGURE_ARGS += --with-gnu-as -CONFIGURE_ARGS += --with-gnu-ld +CONFIGURE_ARGS += --with-gnu-as +CONFIGURE_ARGS += --with-gnu-ld CONFIGURE_ARGS += ${CONFIGURE_SHARED} post-patch: @@ -208,6 +208,7 @@ RUN_DEPENDS-java = archivers/unzip \ archivers/zip>=2.3p0 RUN_DEPENDS-c++ = ${RUN_DEPENDS} libstdc++->=4.2,<4.3|libstdc++->=4.2v0,<4.3v0:${BUILD_PKGPATH},-estdc +RUN_DEPENDS-ada = ${FULLPKGNAME-main}:${BUILD_PKGPATH} WANTLIB-estdc = m WANTLIB-java = c m pthread z @@ -216,19 +217,26 @@ LIB_DEPENDS-f95 = devel/gmp>=4.2 \ WANTLIB-f95 = ${WANTLIB} gmp mpfr .include <bsd.port.mk> -ADA_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-ada}${PKG_SUFX} -GCC_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-main}${PKG_SUFX} +ADA_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-ada}.tgz +GCC_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-main}.tgz adastrap: ${ADA_PACKAGE} ${GCC_PACKAGE} -.if !defined(LIBC_VERSION) +.if !defined(ADASTRAP_LIBC-${MACHINE_ARCH}) @echo 1>&2 "Error: you must specify a libc to bundle" @exit 1 .else mkdir -p ${WRKDIR}/prepare/bootstrap/system-libs - cp /usr/lib/libc.so.${LIBC_VERSION} ${WRKDIR}/prepare/bootstrap/system-libs + cp /usr/lib/libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} \ + ${WRKDIR}/prepare/bootstrap/system-libs cd ${WRKDIR}/prepare/bootstrap && tar zxf ${ADA_PACKAGE} cd ${WRKDIR}/prepare/bootstrap && tar zxf ${GCC_PACKAGE} rm -rf ${WRKDIR}/prepare/bootstrap/{+*,info,man} - cd ${WRKDIR}/prepare && tar zcf ${FULLDISTDIR}/${ADASTRAP} bootstrap + if ! ldd ${WRKDIR}/prepare/bootstrap/bin/egcc | \ + fgrep libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} >/dev/null; then \ + echo 1>&2 "Error: adastrap egcc linked against wrong libc"; \ + exit 1; \ + fi + cd ${WRKDIR}/prepare && \ + tar zcf ${FULLDISTDIR}/${ADASTRAP-${MACHINE_ARCH}} bootstrap .endif Index: 4.2/distinfo =================================================================== RCS file: /home/vcs/cvs/openbsd/ports/lang/gcc/4.2/distinfo,v retrieving revision 1.13 diff -u -p -r1.13 distinfo --- 4.2/distinfo 23 Jan 2012 14:59:57 -0000 1.13 +++ 4.2/distinfo 4 Nov 2012 19:43:18 -0000 @@ -1,10 +1,8 @@ -MD5 (gcc/adastrap-i386-4.2.4-5.tgz) = P7bTVwwZUV8a04KxGkc74g== -MD5 (gcc/gcc-4.2.4.tar.bz2) = 159VPnkW6iHFVjKerP6qFg== -RMD160 (gcc/adastrap-i386-4.2.4-5.tgz) = dPxzQN5ZpqXvCb9HcsIA+TrdccA= -RMD160 (gcc/gcc-4.2.4.tar.bz2) = FXk9crQ8gagK/KCNAxw40RC2ybY= -SHA1 (gcc/adastrap-i386-4.2.4-5.tgz) = HBjIhRuB5xYiawoo6YrX3LrmLio= -SHA1 (gcc/gcc-4.2.4.tar.bz2) = uyDvx3UP4NYXLFlFVyvwNv5Z090= +SHA256 (gcc/adastrap-amd64-4.2.4-1.tgz) = rtUtnfFB451plXgoL3zohSNv8KG/f3HT5oUqwXWf73s= SHA256 (gcc/adastrap-i386-4.2.4-5.tgz) = yaKlqYwZBSgc4aHnJI82CncwnMbC3UWzqr3NWEQWWKs= +SHA256 (gcc/adastrap-sparc64-4.2.4-1.tgz) = God5qMDJK77QhAOIFYsUu8DKTE3YOw2XA2+4Xuzft04= SHA256 (gcc/gcc-4.2.4.tar.bz2) = r7qEXi04VHpjvTl26QJFyB6hdnhvnmlmM5xtN2HxEzo= +SIZE (gcc/adastrap-amd64-4.2.4-1.tgz) = 39976611 SIZE (gcc/adastrap-i386-4.2.4-5.tgz) = 40647378 +SIZE (gcc/adastrap-sparc64-4.2.4-1.tgz) = 39261588 SIZE (gcc/gcc-4.2.4.tar.bz2) = 44025458 Index: 4.6/Makefile =================================================================== RCS file: /home/vcs/cvs/openbsd/ports/lang/gcc/4.6/Makefile,v retrieving revision 1.39 diff -u -p -r1.39 Makefile --- 4.6/Makefile 17 Oct 2012 19:58:21 -0000 1.39 +++ 4.6/Makefile 4 Nov 2012 19:43:18 -0000 @@ -6,9 +6,13 @@ DPB_PROPERTIES = parallel V = 4.6.3 FULL_VERSION = $V FULL_PKGVERSION = $V -BOOTSTRAP_GEN = 0 -LIBC_VERSION = 63.0 -ADASTRAP = adastrap-i386-$V-${BOOTSTRAP_GEN}.tar.xz + +ADASTRAP_LIBC-i386 = 63.0 +ADASTRAP-i386 = adastrap-i386-$V-0.tar.xz +ADASTRAP_LIBC-amd64 = 66.0 +ADASTRAP-amd64 = adastrap-amd64-$V-0.tar.xz +ADASTRAP_LIBC-sparc64 = 66.0 +ADASTRAP-sparc64 = adastrap-sparc64-$V-0.tar.xz PKGNAME-main = gcc-${FULL_PKGVERSION} PKGNAME-c++ = g++-${FULL_PKGVERSION} @@ -20,13 +24,13 @@ PKGNAME-ada = gnat-${FULL_PKGVERSION} PKGNAME-go = gccgo-${FULL_PKGVERSION} PKGSPEC-main = gcc->=4.6,<4.7 -REVISION-main = 12 +REVISION-main = 13 REVISION-c++ = 12 REVISION-estdc = 10 REVISION-f95 = 12 REVISION-java = 13 REVISION-objc = 12 -REVISION-ada = 12 +REVISION-ada = 13 REVISION-go = 12 SHARED_LIBS = estdc++ 14.0 \ @@ -43,7 +47,7 @@ SHARED_LIBS = estdc++ 14.0 \ PSEUDO_FLAVORS = no_c++ no_f95 no_objc no_java no_ada no_go full FLAVOR ?= -ONLY_FOR_ARCHS-ada = i386 +ONLY_FOR_ARCHS-ada = i386 amd64 sparc64 ONLY_FOR_ARCHS-java = amd64 i386 sparc64 MULTI_PACKAGES = -main -f95 -objc -java -c++ -estdc -ada -go @@ -59,7 +63,8 @@ DISTNAME = gcc-${FULL_VERSION} DISTFILES = ${DISTNAME}.tar.bz2 # there's no ecj-4.6.jar ECJ = ecj-4.5.jar -SUPDISTFILES = ${ADASTRAP}:0 ${ECJ}:1 +SUPDISTFILES = ${ADASTRAP-i386}:0 ${ADASTRAP-amd64}:0 ${ADASTRAP-sparc64}:0 \ + ${ECJ}:1 EXTRACT_ONLY = ${DISTNAME}.tar.bz2 USE_LIBTOOL = Yes @@ -94,8 +99,8 @@ VMEM_WARNING = Yes .endif .if ${BUILD_PACKAGES:M-ada} LANGS := ${LANGS},ada -DISTFILES += ${ADASTRAP}:0 -EXTRACT_ONLY += ${ADASTRAP} +DISTFILES += ${ADASTRAP-${MACHINE_ARCH}}:0 +EXTRACT_ONLY += ${ADASTRAP-${MACHINE_ARCH}} EXTRA_ENV += ADAC=${WRKDIR}/bin/egcc GNATBIND=${WRKDIR}/bin/gnatbind CC = ${WRKDIR}/bin/egcc REGRESS_DEPENDS += ${BUILD_PKGPATH},-ada @@ -187,6 +192,7 @@ RUN_DEPENDS-estdc = RUN_DEPENDS-c++ = ${RUN_DEPENDS} \ ${BUILD_PKGPATH},-estdc>=4.6,<4.7 +RUN_DEPENDS-ada = ${FULLPKGNAME-main}:${BUILD_PKGPATH} WANTLIB-estdc = m WANTLIB-f95 = ${WANTLIB} WANTLIB-java = ${WANTLIB} pthread @@ -213,11 +219,6 @@ post-extract: echo "LIB$l_LTVERSION = -version-info ${v:S/./:/}" >> \ ${WRKSRC}/libversions .endfor -.if ${BUILD_PACKAGES:M-ada} - # XXX cheat a bit - cd ${WRKDIR}/bootstrap/system-libs && ln -sf libc.so.${LIBC_VERSION} libc.so.61.0 - ${WRKDIR}/bin/egcc -v # if this fails, you must extract suitable libraries from the relevant OpenBSD release or use the no_ada FLAVOR. -.endif .if ${BUILD_PACKAGES:M-java} cp ${FULLDISTDIR}/${ECJ} ${WRKSRC}/ecj.jar .endif @@ -239,20 +240,26 @@ post-install: .include <bsd.port.mk> -ADA_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-ada}.tgz -GCC_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-main}.tgz +ADA_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-ada}.tgz +GCC_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-main}.tgz adastrap: ${ADA_PACKAGE} ${GCC_PACKAGE} -.if !defined(LIBC_VERSION) +.if !defined(ADASTRAP_LIBC-${MACHINE_ARCH}) @echo 1>&2 "Error: you must specify a libc to bundle" @exit 1 .else mkdir -p ${WRKDIR}/prepare/bootstrap/system-libs - cp /usr/lib/libc.so.${LIBC_VERSION} ${WRKDIR}/prepare/bootstrap/system-libs + cp /usr/lib/libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} \ + ${WRKDIR}/prepare/bootstrap/system-libs cd ${WRKDIR}/prepare/bootstrap && tar zxf ${ADA_PACKAGE} cd ${WRKDIR}/prepare/bootstrap && tar zxf ${GCC_PACKAGE} rm -rf ${WRKDIR}/prepare/bootstrap/{+*,info,man} + if ! ldd ${WRKDIR}/prepare/bootstrap/bin/egcc | \ + fgrep libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} >/dev/null; then \ + echo 1>&2 "Error: adastrap egcc linked against wrong libc"; \ + exit 1; \ + fi cd ${WRKDIR}/prepare && tar cf - bootstrap | \ - xz > ${FULLDISTDIR}/${ADASTRAP} + xz > ${FULLDISTDIR}/${ADASTRAP-${MACHINE_ARCH}} .endif Index: 4.6/distinfo =================================================================== RCS file: /home/vcs/cvs/openbsd/ports/lang/gcc/4.6/distinfo,v retrieving revision 1.5 diff -u -p -r1.5 distinfo --- 4.6/distinfo 31 Mar 2012 20:02:03 -0000 1.5 +++ 4.6/distinfo 4 Nov 2012 19:43:18 -0000 @@ -1,15 +1,10 @@ -MD5 (gcc/adastrap-i386-4.6.3-0.tar.xz) = h3oa6vXJhsLyHMGSyQdGpg== -MD5 (gcc/ecj-4.5.jar) = 181qJ8iAHmbLqpZKA57P2w== -MD5 (gcc/gcc-4.6.3.tar.bz2) = dzCS/lGUNTsCuwEQBSqXLg== -RMD160 (gcc/adastrap-i386-4.6.3-0.tar.xz) = gp0rq+VpuV1tiRT+YLLs+fCYFCQ= -RMD160 (gcc/ecj-4.5.jar) = 0/TaZX8Ia2Qj906T8AETL0hVNoo= -RMD160 (gcc/gcc-4.6.3.tar.bz2) = mrsvlA0I/ITy2RtqbOjWYsqIkmk= -SHA1 (gcc/adastrap-i386-4.6.3-0.tar.xz) = LaVcCPxDBBeZnD8tr+3+pgXxyzU= -SHA1 (gcc/ecj-4.5.jar) = WMHXnGTIzXGFUPMqkyzP3o0eZEk= -SHA1 (gcc/gcc-4.6.3.tar.bz2) = zjF8pcgYW1i8kwAYK1NGCMV4Y38= +SHA256 (gcc/adastrap-amd64-4.6.3-0.tar.xz) = ERQ13M2trP3g8RHRWTuP3xpRvSsdunVsjngys9+6XUM= SHA256 (gcc/adastrap-i386-4.6.3-0.tar.xz) = b5+DW9S4owsMIiWLIJTFxbjLzYBBEj6W2mv9AfRIG2w= +SHA256 (gcc/adastrap-sparc64-4.6.3-0.tar.xz) = Jc8cIUq+YZf1sQkFqjRWfxmwp9gQSjdSt0kshuHW0uk= SHA256 (gcc/ecj-4.5.jar) = mP0Sjx03TZ5C/Z1INr3SScbVEevGwN8X+8G535bD14E= SHA256 (gcc/gcc-4.6.3.tar.bz2) = 6PWFPU7sL166+Kcq5NU8Q2qs+YFTskmfhjW0jEcYoJM= +SIZE (gcc/adastrap-amd64-4.6.3-0.tar.xz) = 25762076 SIZE (gcc/adastrap-i386-4.6.3-0.tar.xz) = 22075992 +SIZE (gcc/adastrap-sparc64-4.6.3-0.tar.xz) = 20885416 SIZE (gcc/ecj-4.5.jar) = 1470676 SIZE (gcc/gcc-4.6.3.tar.bz2) = 71999439 Index: 4.7/Makefile =================================================================== RCS file: /home/vcs/cvs/openbsd/ports/lang/gcc/4.7/Makefile,v retrieving revision 1.19 diff -u -p -r1.19 Makefile --- 4.7/Makefile 7 Oct 2012 20:09:45 -0000 1.19 +++ 4.7/Makefile 4 Nov 2012 19:43:18 -0000 @@ -6,9 +6,11 @@ BROKEN-sparc64 = ICE in libgcc V = 4.7.2 FULL_VERSION = $V FULL_PKGVERSION = $V -BOOTSTRAP_GEN = 0 -LIBC_VERSION = 63.0 -ADASTRAP = adastrap-i386-$V-${BOOTSTRAP_GEN}.tar.xz + +ADASTRAP_LIBC-i386 = 63.0 +ADASTRAP-i386 = adastrap-i386-$V-0.tar.xz +ADASTRAP_LIBC-amd64 = 66.0 +ADASTRAP-amd64 = adastrap-amd64-$V-0.tar.xz PKGNAME-main = gcc-${FULL_PKGVERSION} PKGNAME-c++ = g++-${FULL_PKGVERSION} @@ -22,12 +24,12 @@ PKGNAME-ada = gnat-${FULL_PKGVERSION} #PKGNAME-go = gccgo-${FULL_PKGVERSION} PKGSPEC-main = gcc->=4.7,<4.8 -REVISION-main = 0 +REVISION-main = 1 REVISION-c++ = 0 REVISION-estdc = 0 REVISION-f95 = 0 REVISION-objc = 0 -REVISION-ada = 0 +REVISION-ada = 1 SHARED_LIBS = estdc++ 15.0 \ gfortran 4.0 \ @@ -44,7 +46,7 @@ SHARED_LIBS = estdc++ 15.0 \ PSEUDO_FLAVORS = no_c++ no_f95 no_objc no_java no_ada no_go full FLAVOR ?= -ONLY_FOR_ARCHS-ada = i386 +ONLY_FOR_ARCHS-ada = i386 amd64 ONLY_FOR_ARCHS-java = amd64 i386 sparc64 MULTI_PACKAGES = -main -f95 -objc -c++ -estdc -ada @@ -62,7 +64,7 @@ DISTNAME = gcc-${FULL_VERSION} DISTFILES = ${DISTNAME}.tar.bz2 # there's no ecj-4.7.jar ECJ = ecj-4.5.jar -SUPDISTFILES = ${ADASTRAP}:0 ${ECJ}:1 +SUPDISTFILES = ${ADASTRAP-i386}:0 ${ADASTRAP-amd64}:0 ${ECJ}:1 EXTRACT_ONLY = ${DISTNAME}.tar.bz2 USE_LIBTOOL = Yes @@ -97,8 +99,8 @@ VMEM_WARNING = Yes .endif .if ${BUILD_PACKAGES:M-ada} LANGS := ${LANGS},ada -DISTFILES += ${ADASTRAP}:0 -EXTRACT_ONLY += ${ADASTRAP} +DISTFILES += ${ADASTRAP-${MACHINE_ARCH}}:0 +EXTRACT_ONLY += ${ADASTRAP-${MACHINE_ARCH}} EXTRA_ENV += ADAC=${WRKDIR}/bin/egcc GNATBIND=${WRKDIR}/bin/gnatbind CC = ${WRKDIR}/bin/egcc REGRESS_DEPENDS += ${BUILD_PKGPATH},-ada @@ -190,6 +192,7 @@ RUN_DEPENDS-estdc = RUN_DEPENDS-c++ = ${RUN_DEPENDS} \ ${BUILD_PKGPATH},-estdc>=4.7,<4.8 +RUN_DEPENDS-ada = ${FULLPKGNAME-main}:${BUILD_PKGPATH} WANTLIB-estdc = m WANTLIB-java = ${WANTLIB} pthread WANTLIB-main = ${WANTLIB} pthread @@ -215,11 +218,6 @@ post-extract: echo "LIB$l_LTVERSION = -version-info ${v:S/./:/}" >> \ ${WRKSRC}/libversions .endfor -.if ${BUILD_PACKAGES:M-ada} - # XXX cheat a bit - cd ${WRKDIR}/bootstrap/system-libs && ln -sf libc.so.${LIBC_VERSION} libc.so.61.0 - ${WRKDIR}/bin/egcc -v # if this fails, you must extract suitable libraries from the relevant OpenBSD release or use the no_ada FLAVOR. -.endif .if ${BUILD_PACKAGES:M-java} cp ${FULLDISTDIR}/${ECJ} ${WRKSRC}/ecj.jar .endif @@ -241,20 +239,26 @@ post-install: .include <bsd.port.mk> -ADA_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-ada}.tgz -GCC_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-main}.tgz +ADA_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-ada}.tgz +GCC_PACKAGE = ${PACKAGE_REPOSITORY}/${MACHINE_ARCH}/all/${FULLPKGNAME-main}.tgz adastrap: ${ADA_PACKAGE} ${GCC_PACKAGE} -.if !defined(LIBC_VERSION) +.if !defined(ADASTRAP_LIBC-${MACHINE_ARCH}) @echo 1>&2 "Error: you must specify a libc to bundle" @exit 1 .else mkdir -p ${WRKDIR}/prepare/bootstrap/system-libs - cp /usr/lib/libc.so.${LIBC_VERSION} ${WRKDIR}/prepare/bootstrap/system-libs + cp /usr/lib/libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} \ + ${WRKDIR}/prepare/bootstrap/system-libs cd ${WRKDIR}/prepare/bootstrap && tar zxf ${ADA_PACKAGE} cd ${WRKDIR}/prepare/bootstrap && tar zxf ${GCC_PACKAGE} rm -rf ${WRKDIR}/prepare/bootstrap/{+*,info,man} + if ! ldd ${WRKDIR}/prepare/bootstrap/bin/egcc | \ + fgrep libc.so.${ADASTRAP_LIBC-${MACHINE_ARCH}} >/dev/null; then \ + echo 1>&2 "Error: adastrap egcc linked against wrong libc"; \ + exit 1; \ + fi cd ${WRKDIR}/prepare && tar cf - bootstrap | \ - xz > ${FULLDISTDIR}/${ADASTRAP} + xz > ${FULLDISTDIR}/${ADASTRAP-${MACHINE_ARCH}} .endif Index: 4.7/distinfo =================================================================== RCS file: /home/vcs/cvs/openbsd/ports/lang/gcc/4.7/distinfo,v retrieving revision 1.3 diff -u -p -r1.3 distinfo --- 4.7/distinfo 28 Sep 2012 18:45:42 -0000 1.3 +++ 4.7/distinfo 4 Nov 2012 19:43:18 -0000 @@ -1,6 +1,8 @@ -SHA256 (gcc/adastrap-i386-4.7.2-0.tar.xz) = 7zzkpP6UDkWQckJy9arvYOSEfhWpnqdzqETxdCE43a4= +SHA256 (gcc/adastrap-amd64-4.7.2-0.tar.xz) = 6y44r5vz49SKyE8/hAGz5ix7hy1xyn5o6wGHz2qhbcY= +SHA256 (gcc/adastrap-i386-4.7.2-0.tar.xz) = LyX2zLBrrveS+0ffql1dfoDD4UTOt3V2+LDR3R4fLXI= SHA256 (gcc/ecj-4.5.jar) = mP0Sjx03TZ5C/Z1INr3SScbVEevGwN8X+8G535bD14E= SHA256 (gcc/gcc-4.7.2.tar.bz2) = ipKD1wEPuf5ezjylB+CvXBlBJiY4T4pelDQlGuEAsIQ= -SIZE (gcc/adastrap-i386-4.7.2-0.tar.xz) = 30305556 +SIZE (gcc/adastrap-amd64-4.7.2-0.tar.xz) = 34066848 +SIZE (gcc/adastrap-i386-4.7.2-0.tar.xz) = 29194740 SIZE (gcc/ecj-4.5.jar) = 1470676 SIZE (gcc/gcc-4.7.2.tar.bz2) = 82884636 Index: 4.7/patches/patch-gcc_ada_gcc-interface_Makefile_in =================================================================== RCS file: /home/vcs/cvs/openbsd/ports/lang/gcc/4.7/patches/patch-gcc_ada_gcc-interface_Makefile_in,v retrieving revision 1.2 diff -u -p -r1.2 patch-gcc_ada_gcc-interface_Makefile_in --- 4.7/patches/patch-gcc_ada_gcc-interface_Makefile_in 1 Jul 2012 18:56:45 -0000 1.2 +++ 4.7/patches/patch-gcc_ada_gcc-interface_Makefile_in 4 Nov 2012 19:43:18 -0000 @@ -1,6 +1,6 @@ $OpenBSD: patch-gcc_ada_gcc-interface_Makefile_in,v 1.2 2012/07/01 18:56:45 pascal Exp $ ---- gcc/ada/gcc-interface/Makefile.in.orig Tue Jun 12 17:12:37 2012 -+++ gcc/ada/gcc-interface/Makefile.in Wed Jun 20 14:39:11 2012 +--- gcc/ada/gcc-interface/Makefile.in.orig Mon Aug 6 16:34:27 2012 ++++ gcc/ada/gcc-interface/Makefile.in Sat Sep 29 18:22:21 2012 @@ -103,13 +103,13 @@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi TEXI2PDF = texi2pdf @@ -17,10 +17,20 @@ $OpenBSD: patch-gcc_ada_gcc-interface_Ma PICFLAG_FOR_TARGET = @PICFLAG_FOR_TARGET@ # Pretend that _Unwind_GetIPInfo is available for the target by default. This -@@ -1253,6 +1253,32 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(o - - EH_MECHANISM=-gcc - THREADSLIB= -lpthread +@@ -1243,6 +1243,58 @@ ifeq ($(strip $(filter-out %86_64 freebsd%,$(arch) $(o + s-taspri.ads<s-taspri-posix.ads \ + s-tpopsp.adb<s-tpopsp-posix.adb \ + g-trasym.adb<g-trasym-dwarf.adb \ ++ $(ATOMICS_TARGET_PAIRS) \ ++ $(X86_64_TARGET_PAIRS) \ ++ system.ads<system-freebsd-x86_64.ads ++ ++ TOOLS_TARGET_PAIRS = \ ++ mlib-tgt-specific.adb<mlib-tgt-specific-linux.adb ++ GNATLIB_SHARED = gnatlib-shared-dual ++ ++ EH_MECHANISM=-gcc ++ THREADSLIB= -lpthread + GMEM_LIB = gmemlib + LIBRARY_VERSION := $(LIB_VERSION) + MISCLIB = -lutil @@ -46,7 +56,23 @@ $OpenBSD: patch-gcc_ada_gcc-interface_Ma + GNATLIB_SHARED = gnatlib-shared-dual + + EH_MECHANISM=-gcc -+ THREADSLIB= -pthread - GMEM_LIB = gmemlib - LIBRARY_VERSION := $(LIB_VERSION) - MISCLIB = -lutil ++ THREADSLIB= -lpthread ++ GMEM_LIB = gmemlib ++ LIBRARY_VERSION := $(LIB_VERSION) ++ MISCLIB = -lutil ++endif ++ ++ifeq ($(strip $(filter-out %86_64 openbsd%,$(arch) $(osys))),) ++ LIBGNAT_TARGET_PAIRS = \ ++ a-intnam.ads<a-intnam-freebsd.ads \ ++ s-inmaop.adb<s-inmaop-posix.adb \ ++ s-intman.adb<s-intman-posix.adb \ ++ s-osinte.adb<s-osinte-freebsd.adb \ ++ s-osinte.ads<s-osinte-freebsd.ads \ ++ s-osprim.adb<s-osprim-posix.adb \ ++ s-taprop.adb<s-taprop-posix.adb \ ++ s-taspri.ads<s-taspri-posix.ads \ ++ s-tpopsp.adb<s-tpopsp-posix.adb \ + $(ATOMICS_TARGET_PAIRS) \ + $(X86_64_TARGET_PAIRS) \ + system.ads<system-freebsd-x86_64.ads