Provide 32-bit runtime support on amd64 as a separate distribution, lib32.

Prodded by:	obrien
Nodded by:	peter
Approved by:	re
This commit is contained in:
Ruslan Ermilov 2005-06-16 18:16:14 +00:00
parent d873676af6
commit ece6831d38
10 changed files with 54 additions and 14 deletions

View File

@ -71,7 +71,7 @@ TGTS= all all-man buildenv buildkernel buildworld checkdpadd clean \
obj objlink regress rerelease tags toolchain update \
_worldtmp _legacy _bootstrap-tools _cleanobj _obj \
_build-tools _cross-tools _includes _libraries _depend \
build32 install32
build32 distribute32 install32
BITGTS= files includes
BITGTS:=${BITGTS} ${BITGTS:S/^/build/} ${BITGTS:S/^/install/}

View File

@ -435,14 +435,18 @@ build32:
PROG=ld-elf32.so.1 ${LIB32MAKE} DESTDIR=${LIB32TMP} ${_t}
.endfor
install32:
distribute32 install32:
.if make(distribute32)
mkdir -p ${DISTDIR}/${DISTRIBUTION}/usr/lib32 # XXX add to mtree
.else
mkdir -p ${DESTDIR}/usr/lib32 # XXX add to mtree
cd ${.CURDIR}/lib; ${LIB32MAKE} install
cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} install
.if !defined(NO_CRYPT)
cd ${.CURDIR}/secure/lib; ${LIB32MAKE} install
.endif
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} install
cd ${.CURDIR}/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
cd ${.CURDIR}/gnu/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
.if !defined(NO_CRYPT)
cd ${.CURDIR}/secure/lib; ${LIB32MAKE} ${.TARGET:S/32$//}
.endif
cd ${.CURDIR}/libexec/rtld-elf; PROG=ld-elf32.so.1 ${LIB32MAKE} ${.TARGET:S/32$//}
.endif
@ -550,6 +554,9 @@ redistribute:
@echo ">>> Distributing everything"
@echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
.if ${TARGET_ARCH} == "amd64" && !defined(NO_LIB32)
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 DISTRIBUTION=lib32
.endif
distribution:
cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} distribution

View File

@ -162,8 +162,11 @@ DIST_DOCS_ARCH_DEP= installation relnotes hardware
# Things which without too much trouble can be considered variables
# BASE_DISTS are special in that they get full /etc installation sets.
#
OTHER_DISTS?= catpages manpages games proflibs dict info doc
OTHER_DISTS?= catpages manpages games proflibs dict info doc ${ARCH_DISTS}
BASE_DISTS?= base
.if ${TARGET_ARCH} == "amd64"
ARCH_DISTS?= lib32
.endif
DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS}
# mountpoint for filesystems.
@ -351,8 +354,9 @@ release rerelease:
.endif
mkdir -p ${CHROOTDIR}
@echo ">>> make release for ${TARGET} started on `LC_ALL=C TZ=GMT date`"
cd ${WORLDDIR} && ${NATIVEMAKE} -DNO_GAMES -DNO_HTML -DNO_INFO -DNO_MAN \
-DNO_NLS -DNO_PROFILE installworld DESTDIR=${CHROOTDIR}
cd ${WORLDDIR} && ${NATIVEMAKE} -DNO_GAMES -DNO_HTML -DNO_INFO \
-DNO_LIB32 -DNO_MAN -DNO_NLS -DNO_PROFILE installworld \
DESTDIR=${CHROOTDIR}
cd ${WORLDDIR} && ${NATIVEMAKE} distribution DESTDIR=${CHROOTDIR}
if [ -f /etc/resolv.conf ]; then \
cp -p /etc/resolv.conf ${CHROOTDIR}/etc; \
@ -623,7 +627,8 @@ release.5:
# Remove all the directories we don't need.
-cd ${RD}/trees && \
find ${OTHER_DISTS} -depth -type d -print | xargs rmdir
(find ${OTHER_DISTS} -path '*/var/empty' | xargs chflags noschg; \
find ${OTHER_DISTS} -depth -type d -print | xargs rmdir)
touch ${.TARGET}
#

View File

@ -0,0 +1,8 @@
#!/bin/sh
#
# $FreeBSD$
#
# Clean the dust.
cd ${RD}/trees/lib32 && \
find . ! -path '*/libexec/*' ! -path '*/usr/lib32/*' -delete

View File

@ -969,6 +969,10 @@ DMenu MenuSubDistributions = {
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
{ " info", "GNU info files",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
#ifdef __amd64__
{ " lib32", "32-bit runtime compatibility libraries",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LIB32 },
#endif
{ " man", "System manual pages - recommended",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
{ " catman", "Preformatted system manual pages",

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd August 9, 1997
.Dd June 14, 2005
.Dt SYSINSTALL 8
.Os
.Sh NAME
@ -419,6 +419,9 @@ Profiled libraries for developers.
Dictionary information (for tools like spell).
.It Li info
GNU info files and other extra docs.
.It Li lib32
(amd64 only)
32-bit runtime compatibility libraries.
.It Li compat1x
Compatibility with
.Fx

View File

@ -81,6 +81,9 @@ static Distribution DistTable[] = {
DTE_TARBALL("proflibs", &Dists, PROFLIBS, "/"),
DTE_TARBALL("dict", &Dists, DICT, "/"),
DTE_TARBALL("info", &Dists, INFO, "/"),
#ifdef __amd64__
DTE_TARBALL("lib32", &Dists, LIB32, "/"),
#endif
DTE_SUBDIST("src", &Dists, SRC, SrcDistTable),
DTE_TARBALL("ports", &Dists, PORTS, "/usr"),
DTE_TARBALL("local", &Dists, LOCAL, "/"),

View File

@ -16,6 +16,9 @@
#define DIST_CATPAGES 0x00200
#define DIST_PORTS 0x00400
#define DIST_LOCAL 0x00800
#ifdef __amd64__
#define DIST_LIB32 0x01000
#endif
#define DIST_ALL 0xFFFFF
/* Subtypes for SRC distribution */

View File

@ -969,6 +969,10 @@ DMenu MenuSubDistributions = {
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_GAMES },
{ " info", "GNU info files",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_INFO },
#ifdef __amd64__
{ " lib32", "32-bit runtime compatibility libraries",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_LIB32 },
#endif
{ " man", "System manual pages - recommended",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_MANPAGES },
{ " catman", "Preformatted system manual pages",

View File

@ -24,7 +24,7 @@
.\"
.\" $FreeBSD$
.\"
.Dd August 9, 1997
.Dd June 14, 2005
.Dt SYSINSTALL 8
.Os
.Sh NAME
@ -419,6 +419,9 @@ Profiled libraries for developers.
Dictionary information (for tools like spell).
.It Li info
GNU info files and other extra docs.
.It Li lib32
(amd64 only)
32-bit runtime compatibility libraries.
.It Li compat1x
Compatibility with
.Fx