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
@ -172,7 +172,8 @@ CROSSENV= MAKEOBJDIRPREFIX=${OBJTREE} \
|
||||
|
||||
# bootstrap-tool stage
|
||||
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
|
||||
TMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE} \
|
||||
@ -183,8 +184,9 @@ TMAKE= ${TMAKEENV} ${MAKE} -f Makefile.inc1
|
||||
# cross-tool stage
|
||||
XMAKEENV= ${BOOTSTRAPENV} \
|
||||
TARGET_ARCH=${MACHINE_ARCH}
|
||||
XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNOMAN -DNOINFO -DNOHTML \
|
||||
-DNO_FORTRAN -DNO_GDB
|
||||
XMAKE= ${XMAKEENV} ${MAKE} -f Makefile.inc1 -DNO_FORTRAN -DNO_GDB \
|
||||
-DNOHTML -DNOINFO -DNOMAN -DNOPIC -DNOPROFILE \
|
||||
-DNOSHARED
|
||||
|
||||
# world stage
|
||||
WMAKEENV= ${CROSSENV} \
|
||||
@ -298,7 +300,7 @@ everything:
|
||||
#
|
||||
installworld:
|
||||
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 \
|
||||
test true uname wc zic; do \
|
||||
cp `which $$prog` ${INSTALLTMP}; \
|
||||
@ -551,13 +553,9 @@ _libkrb5= kerberos5/lib/libroken kerberos5/lib/libasn1 kerberos5/lib/libhdb \
|
||||
kerberos5/lib/libsl
|
||||
.endif
|
||||
|
||||
.if !defined(NOPERL)
|
||||
_perl= gnu/usr.bin/perl
|
||||
.endif
|
||||
|
||||
build-tools:
|
||||
.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
|
||||
.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
|
||||
.endif
|
||||
|
||||
.if !defined(NOPERL)
|
||||
_perl= gnu/usr.bin/perl/libperl gnu/usr.bin/perl/miniperl
|
||||
.endif
|
||||
|
||||
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
|
||||
cd ${.CURDIR}/${_tool}; \
|
||||
${MAKE} obj; \
|
||||
@ -745,13 +747,16 @@ _libm= lib/msun
|
||||
_libkeycap= usr.sbin/pcvt/keycap
|
||||
.endif
|
||||
|
||||
.if !defined(NOPERL)
|
||||
_libperl= gnu/usr.bin/perl/libperl
|
||||
.endif
|
||||
|
||||
libraries:
|
||||
.for _lib in ${_csu} gnu/lib/csu gnu/lib/libgcc lib/libmd lib/libcrypt \
|
||||
${_secure_lib} ${_kerberosIV_lib} \
|
||||
${_kerberos5_lib} lib/libcom_err ${_libm} lib/libncurses \
|
||||
lib/libopie lib/libradius lib/libskey lib/libtacplus lib/libutil \
|
||||
lib/libz lib gnu/lib \
|
||||
${_libperl} usr.bin/lex/lib ${_libkeycap}
|
||||
lib/libz lib gnu/lib ${_libperl} usr.bin/lex/lib ${_libkeycap}
|
||||
.if exists(${.CURDIR}/${_lib})
|
||||
cd ${.CURDIR}/${_lib}; \
|
||||
${MAKE} depend; \
|
||||
|
@ -1,11 +1,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
SUBDIR= libperl miniperl perl suidperl library pod utils x2p
|
||||
SUBDIR= libperl perl suidperl library pod utils x2p
|
||||
|
||||
MAINTAINER=markm@freebsd.org
|
||||
|
||||
build-tools:
|
||||
cd ${.CURDIR}/libperl && make build-tools
|
||||
cd ${.CURDIR}/miniperl && make build-tools
|
||||
|
||||
.include <bsd.subdir.mk>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
PERL5SRC?= ${.CURDIR}/../../../../contrib/perl5
|
||||
PERL5LIBSRC?= ${.CURDIR}/../libperl
|
||||
MINIPERL?= ${.OBJDIR}/../miniperl/miniperl
|
||||
MINIPERL?= miniperl
|
||||
|
||||
BINDIR?= /usr/bin
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5
|
||||
PERL5LIBSRC?= ${.CURDIR}/../../libperl
|
||||
MINIPERL= ${.OBJDIR}/../../miniperl/miniperl
|
||||
MINIPERL= miniperl
|
||||
|
||||
MODULEDIR?= ${MODULE}
|
||||
|
||||
|
@ -17,8 +17,6 @@ LDADD= ${MYLIBPERL} -lm -lcrypt -lutil
|
||||
build-tools: cleandepend
|
||||
cd ${.CURDIR} && ${MAKE} ${PROG}
|
||||
|
||||
install distribute:
|
||||
|
||||
NO_PERL_SCRIPT_MAKE= true
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5
|
||||
MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl
|
||||
MINIPERL= ${.OBJDIR}/../../miniperl/miniperl
|
||||
MINIPERL= miniperl
|
||||
|
||||
CLEANFILES+= ${PROG}.1 ${PROG}.PL
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5
|
||||
PERL5LIBSRC= ${.CURDIR}/../../libperl
|
||||
MINIPERL= ${.OBJDIR}/../../miniperl/miniperl
|
||||
MINIPERL= miniperl
|
||||
|
||||
.include "../Makefile.inc"
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5
|
||||
PERL5LIBSRC= ${.CURDIR}/../../libperl
|
||||
MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl
|
||||
MINIPERL= ${.OBJDIR}/../../miniperl/miniperl
|
||||
MINIPERL= miniperl
|
||||
|
||||
LDFLAGS+= -L${.OBJDIR}/../../libperl
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user