like for 4.2, bundle a libc with adastrap.

cheat a bit: bundle the libc from 5.0, and pretend it's the one we built
with... (to be cleaned next time someone bootstraps ada)
This commit is contained in:
espie 2012-01-23 15:34:01 +00:00
parent da7ac90093
commit b7fe4f0430
2 changed files with 24 additions and 11 deletions

View File

@ -1,12 +1,13 @@
# $OpenBSD: Makefile,v 1.10 2011/12/11 21:11:37 pascal Exp $
# $OpenBSD: Makefile,v 1.11 2012/01/23 15:34:01 espie Exp $
ONLY_FOR_ARCHS = amd64 i386 powerpc sparc sparc64
V = 4.6.2
FULL_VERSION = $V
FULL_PKGVERSION = $V
BOOTSTRAP_GEN = 3
BOOTSTRAP_GEN = 4
# XXX this needs libc.so.61.0 to build on i386
LIBC_VERSION = 60.1
ADASTRAP = adastrap-i386-$V-${BOOTSTRAP_GEN}.tar.xz
PKGNAME-main = gcc-${FULL_PKGVERSION}
@ -59,7 +60,8 @@ REGRESS_DEPENDS = devel/dejagnu \
devel/autogen
MASTER_SITES = ${MASTER_SITE_GCC:=releases/gcc-$(FULL_VERSION)/}
MASTER_SITES0 = http://spacehopper.org/mirrors/
#MASTER_SITES0 = http://spacehopper.org/mirrors/
MASTER_SITES0 = ftp://quatramaran.ens.fr/pub/espie/
MASTER_SITES1 = ftp://sources.redhat.com/pub/java/
LANGS = c
@ -182,17 +184,22 @@ CONFIG = x86_64-unknown-openbsd${OSREV}
.endif
post-extract:
# XXX cheat a bit
cd ${WRKDIR}/bootstrap/system-libs && ln -sf libc.so.${LIBC_VERSION} libc.so.61.0
.for f in egcc gnatbind gnatmake gnatlink
echo "#! /bin/sh" >${WRKDIR}/bin/$f
echo 'GNAT_ROOT=${WRKDIR}/bootstrap GCC_ROOT=${WRKDIR}/bootstrap exec ${WRKDIR}/bootstrap/bin/$f "$$@"' >>${WRKDIR}/bin/$f
echo 'GNAT_ROOT=${WRKDIR}/bootstrap GCC_ROOT=${WRKDIR}/bootstrap LD_LIBRARY_PATH=${WRKDIR}/bootstrap/system-libs exec ${WRKDIR}/bootstrap/bin/$f "$$@"' >>${WRKDIR}/bin/$f
chmod a+x ${WRKDIR}/bin/$f
.endfor
ln -s /usr/bin/nm ${WRKDIR}/bin/enm
ln -sf /usr/bin/nm ${WRKDIR}/bin/enm
echo "# This file automatically generated" >> ${WRKSRC}/libversions
.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
.if ${BUILD_PACKAGES:M-java}
cp ${FULLDISTDIR}/${ECJ} ${WRKSRC}/ecj.jar
.endif
@ -218,10 +225,16 @@ ADA_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-ada}${PKG_SUFX}
GCC_PACKAGE = ${PACKAGE_REPOSITORY}/i386/all/${PKGNAME-main}${PKG_SUFX}
adastrap: ${ADA_PACKAGE} ${GCC_PACKAGE}
mkdir -p ${WRKDIR}/prepare/bootstrap
.if !defined(LIBC_VERSION)
@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
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 cf - bootstrap | \
xz > ${FULLDISTDIR}/${ADASTRAP}
.endif

View File

@ -1,15 +1,15 @@
MD5 (gcc/adastrap-i386-4.6.2-3.tar.xz) = WGwmZOp1WyBbuEzHMY7PNg==
MD5 (gcc/adastrap-i386-4.6.2-4.tar.xz) = FibxHoV1fg6jBcsB3D7DeA==
MD5 (gcc/ecj-4.5.jar) = 181qJ8iAHmbLqpZKA57P2w==
MD5 (gcc/gcc-4.6.2.tar.bz2) = AoEVxPv7bP111jafSpDYfg==
RMD160 (gcc/adastrap-i386-4.6.2-3.tar.xz) = YpNBjGOnlvqIzT7gkkZuzlGSNlA=
RMD160 (gcc/adastrap-i386-4.6.2-4.tar.xz) = YXEXTT1xsciAWS0MQaY4bMLPRVw=
RMD160 (gcc/ecj-4.5.jar) = 0/TaZX8Ia2Qj906T8AETL0hVNoo=
RMD160 (gcc/gcc-4.6.2.tar.bz2) = 5wQZM7OWKflSSEjc+BoaTAKiJcY=
SHA1 (gcc/adastrap-i386-4.6.2-3.tar.xz) = mLVRYSqBDeKINW1DWzocFua9a9A=
SHA1 (gcc/adastrap-i386-4.6.2-4.tar.xz) = zDgUMphqiUrZWX2uC+3hWHkjVlY=
SHA1 (gcc/ecj-4.5.jar) = WMHXnGTIzXGFUPMqkyzP3o0eZEk=
SHA1 (gcc/gcc-4.6.2.tar.bz2) = aRl0YTscHxXtAYLsU5+lShLdb5M=
SHA256 (gcc/adastrap-i386-4.6.2-3.tar.xz) = 5vvqHK+D/U+fW87Sw6ZSsZZd4RhY50KFc1QWxaBwK48=
SHA256 (gcc/adastrap-i386-4.6.2-4.tar.xz) = Cxx6UgMtW6Y4jWvomF9CBGrs4um2+M4aoINKZEUO2Wc=
SHA256 (gcc/ecj-4.5.jar) = mP0Sjx03TZ5C/Z1INr3SScbVEevGwN8X+8G535bD14E=
SHA256 (gcc/gcc-4.6.2.tar.bz2) = YLBUY9/hjUDWj7inGyW0CKAfhsxs6vXmsiI4trD0UMI=
SIZE (gcc/adastrap-i386-4.6.2-3.tar.xz) = 44989516
SIZE (gcc/adastrap-i386-4.6.2-4.tar.xz) = 45729588
SIZE (gcc/ecj-4.5.jar) = 1470676
SIZE (gcc/gcc-4.6.2.tar.bz2) = 71995338