Fix cross-building.
o Move building libperl and miniperl from build-tools to cross-tools. libperl uses MACHINE_ARCH to determine the right configuration, which doesn't match the build machine when cross-building if they are built as build- tools. o Since miniperl needs to be built as a cross-tool, it needs to be installed under /usr/obj so that it can be used (cross-tools have a special object directory to avoid build conflicts. As a downside, you can't easily run cross-tools from their object directory). Remove the install and distribute override targets. To avoid having miniperl installed by installworld, remove it from SUBDIR. o We can't pickup miniperl from the object directory but since it's installed, depend on PATH. This is save, because the makefiles are run with a known path. o Build libperl again as part of the library target. A _libperl variable existed, but it was never defined. o Add chmod to the list of saved tools, because perl conditionally uses it during install. The bootstrap-tools and cross-tools targets are modified to avoid building profiled and shared libraries. While here, have these targets build static binaries instead of shared binaries. Approved by: markm
This commit is contained in:
parent
499c499c61
commit
ad879ce955
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=68927
@ -172,7 +172,8 @@ CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \
|
|||||||
|
|
||||||
# bootstrap-tool stage
|
# bootstrap-tool stage
|
||||||
BMAKEENV= ${BOOTSTRAPENV}
|
BMAKEENV= ${BOOTSTRAPENV}
|
||||||
BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO -DNOHTML
|
BMAKE= ${BMAKEENV} ${MAKE} -f Makefile.inc1 -DNOHTML -DNOINFO \
|
||||||
|
-DNOMAN -DNOPIC -DNOPROFILE -DNOSHARED
|
||||||
|
|
||||||
# build-tool stage
|
# build-tool stage
|
||||||
TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \
|
TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \
|
||||||
@ -183,8 +184,9 @@ TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1
|
|||||||
# cross-tool stage
|
# cross-tool stage
|
||||||
XMAKEENV= ${BOOTSTRAPENV} \
|
XMAKEENV= ${BOOTSTRAPENV} \
|
||||||
TARGET_ARCH=${MACHINE_ARCH}
|
TARGET_ARCH=${MACHINE_ARCH}
|
||||||
XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO -DNOHTML \
|
XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNO_FORTRAN -DNO_GDB \
|
||||||
-DNO_FORTRAN -DNO_GDB
|
-DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE \
|
||||||
|
-DNOSHARED
|
||||||
|
|
||||||
# world stage
|
# world stage
|
||||||
WMAKEENV= ${CROSSENV} \
|
WMAKEENV= ${CROSSENV} \
|
||||||
@ -298,7 +300,7 @@ everything:
|
|||||||
#
|
#
|
||||||
installworld:
|
installworld:
|
||||||
mkdir -p ${INSTALLTMP}
|
mkdir -p ${INSTALLTMP}
|
||||||
for prog in [ awk cat chflags chown date echo egrep find grep \
|
for prog in [ awk cat chflags chmod chown date echo egrep find grep \
|
||||||
install ln make makewhatis mtree mv perl rm sed sh sysctl \
|
install ln make makewhatis mtree mv perl rm sed sh sysctl \
|
||||||
test true uname wc zic; do \
|
test true uname wc zic; do \
|
||||||
cp `which $$prog` ${INSTALLTMP}; \
|
cp `which $$prog` ${INSTALLTMP}; \
|
||||||
@ -551,13 +553,9 @@ _libkrb5= kerberos5/lib/libroken kerberos5/lib/libasn1 kerberos5/lib/libhdb \
|
|||||||
kerberos5/lib/libsl
|
kerberos5/lib/libsl
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !defined(NOPERL)
|
|
||||||
_perl= gnu/usr.bin/perl
|
|
||||||
.endif
|
|
||||||
|
|
||||||
build-tools:
|
build-tools:
|
||||||
.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \
|
.for _tool in bin/sh ${_games} gnu/usr.bin/cc/cc_tools ${_fortran} \
|
||||||
${_libroken4} ${_libkrb5} lib/libncurses ${_share} ${_perl}
|
${_libroken4} ${_libkrb5} lib/libncurses ${_share}
|
||||||
cd ${.CURDIR}/${_tool}; ${MAKE} build-tools
|
cd ${.CURDIR}/${_tool}; ${MAKE} build-tools
|
||||||
.endfor
|
.endfor
|
||||||
|
|
||||||
@ -588,8 +586,12 @@ _btxld= usr.sbin/btxld
|
|||||||
_aout_tools= usr.bin/size usr.bin/strip gnu/usr.bin/as gnu/usr.bin/ld
|
_aout_tools= usr.bin/size usr.bin/strip gnu/usr.bin/as gnu/usr.bin/ld
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if !defined(NOPERL)
|
||||||
|
_perl= gnu/usr.bin/perl/libperl gnu/usr.bin/perl/miniperl
|
||||||
|
.endif
|
||||||
|
|
||||||
cross-tools:
|
cross-tools:
|
||||||
.for _tool in ${_aout_tools} ${_btxld} ${_elf2exe} usr.bin/genassym \
|
.for _tool in ${_aout_tools} ${_btxld} ${_elf2exe} ${_perl} usr.bin/genassym \
|
||||||
usr.bin/gensetdefs gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc
|
usr.bin/gensetdefs gnu/usr.bin/binutils usr.bin/objformat gnu/usr.bin/cc
|
||||||
cd ${.CURDIR}/${_tool}; \
|
cd ${.CURDIR}/${_tool}; \
|
||||||
${MAKE} obj; \
|
${MAKE} obj; \
|
||||||
@ -745,13 +747,16 @@ _libm= lib/msun
|
|||||||
_libkeycap= usr.sbin/pcvt/keycap
|
_libkeycap= usr.sbin/pcvt/keycap
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
.if !defined(NOPERL)
|
||||||
|
_libperl= gnu/usr.bin/perl/libperl
|
||||||
|
.endif
|
||||||
|
|
||||||
libraries:
|
libraries:
|
||||||
.for _lib in ${_csu} gnu/lib/csu gnu/lib/libgcc lib/libmd lib/libcrypt \
|
.for _lib in ${_csu} gnu/lib/csu gnu/lib/libgcc lib/libmd lib/libcrypt \
|
||||||
${_secure_lib} ${_kerberosIV_lib} \
|
${_secure_lib} ${_kerberosIV_lib} \
|
||||||
${_kerberos5_lib} lib/libcom_err ${_libm} lib/libncurses \
|
${_kerberos5_lib} lib/libcom_err ${_libm} lib/libncurses \
|
||||||
lib/libopie lib/libradius lib/libskey lib/libtacplus lib/libutil \
|
lib/libopie lib/libradius lib/libskey lib/libtacplus lib/libutil \
|
||||||
lib/libz lib gnu/lib \
|
lib/libz lib gnu/lib ${_libperl} usr.bin/lex/lib ${_libkeycap}
|
||||||
${_libperl} usr.bin/lex/lib ${_libkeycap}
|
|
||||||
.if exists(${.CURDIR}/${_lib})
|
.if exists(${.CURDIR}/${_lib})
|
||||||
cd ${.CURDIR}/${_lib}; \
|
cd ${.CURDIR}/${_lib}; \
|
||||||
${MAKE} depend; \
|
${MAKE} depend; \
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
SUBDIR= libperl miniperl perl suidperl library pod utils x2p
|
SUBDIR= libperl perl suidperl library pod utils x2p
|
||||||
|
|
||||||
MAINTAINER=markm@freebsd.org
|
MAINTAINER=markm@freebsd.org
|
||||||
|
|
||||||
build-tools:
|
|
||||||
cd ${.CURDIR}/libperl && make build-tools
|
|
||||||
cd ${.CURDIR}/miniperl && make build-tools
|
|
||||||
|
|
||||||
.include <bsd.subdir.mk>
|
.include <bsd.subdir.mk>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
PERL5SRC?= ${.CURDIR}/../../../../contrib/perl5
|
PERL5SRC?= ${.CURDIR}/../../../../contrib/perl5
|
||||||
PERL5LIBSRC?= ${.CURDIR}/../libperl
|
PERL5LIBSRC?= ${.CURDIR}/../libperl
|
||||||
MINIPERL?= ${.OBJDIR}/../miniperl/miniperl
|
MINIPERL?= miniperl
|
||||||
|
|
||||||
BINDIR?= /usr/bin
|
BINDIR?= /usr/bin
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5
|
PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5
|
||||||
PERL5LIBSRC?= ${.CURDIR}/../../libperl
|
PERL5LIBSRC?= ${.CURDIR}/../../libperl
|
||||||
MINIPERL= ${.OBJDIR}/../../miniperl/miniperl
|
MINIPERL= miniperl
|
||||||
|
|
||||||
MODULEDIR?= ${MODULE}
|
MODULEDIR?= ${MODULE}
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@ LDADD= ${MYLIBPERL} -lm -lcrypt -lutil
|
|||||||
build-tools: cleandepend
|
build-tools: cleandepend
|
||||||
cd ${.CURDIR} && ${MAKE} ${PROG}
|
cd ${.CURDIR} && ${MAKE} ${PROG}
|
||||||
|
|
||||||
install distribute:
|
|
||||||
|
|
||||||
NO_PERL_SCRIPT_MAKE= true
|
NO_PERL_SCRIPT_MAKE= true
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5
|
PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5
|
||||||
MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl
|
MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl
|
||||||
MINIPERL= ${.OBJDIR}/../../miniperl/miniperl
|
MINIPERL= miniperl
|
||||||
|
|
||||||
CLEANFILES+= ${PROG}.1 ${PROG}.PL
|
CLEANFILES+= ${PROG}.1 ${PROG}.PL
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5
|
PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5
|
||||||
PERL5LIBSRC= ${.CURDIR}/../../libperl
|
PERL5LIBSRC= ${.CURDIR}/../../libperl
|
||||||
MINIPERL= ${.OBJDIR}/../../miniperl/miniperl
|
MINIPERL= miniperl
|
||||||
|
|
||||||
.include "../Makefile.inc"
|
.include "../Makefile.inc"
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5
|
PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5
|
||||||
PERL5LIBSRC= ${.CURDIR}/../../libperl
|
PERL5LIBSRC= ${.CURDIR}/../../libperl
|
||||||
MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl
|
MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl
|
||||||
MINIPERL= ${.OBJDIR}/../../miniperl/miniperl
|
MINIPERL= miniperl
|
||||||
|
|
||||||
LDFLAGS+= -L${.OBJDIR}/../../libperl
|
LDFLAGS+= -L${.OBJDIR}/../../libperl
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user