diff options
author | ru <ru@FreeBSD.org> | 2001-09-29 13:17:54 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2001-09-29 13:17:54 +0000 |
commit | 0579c777d9b29d130ff30dd785721affe0a6fe03 (patch) | |
tree | 8117c933d52263b2b6158bc073d28d25695c829d /gnu | |
parent | a6cad80bb4768dd71cb6375107e4ba547f48f27e (diff) | |
download | FreeBSD-src-0579c777d9b29d130ff30dd785721affe0a6fe03.zip FreeBSD-src-0579c777d9b29d130ff30dd785721affe0a6fe03.tar.gz |
Fix cross-building, etc:
1. To cross-build, one now needs to set TARGET_ARCH, and not the
MACHINE_ARCH. MACHINE_ARCH should never be changed manually!
2. Initialize DESTDIR= explicitly for bootstrap-tools, build-tools,
and cross-tools stages. This fixes broken header and library
dependencies problem. We build them in the host environment,
and obviously want them to depend on host headers and libraries.
The problem with broken header dependencies for bootstrap-tools
and cross-tools was already partially solved (see BOOTSTRAPPING
tests in bsd.prog.mk and bsd.lib.mk), but it was still there for
build-tools if the user ran "make world DESTDIR=/foo". Also,
for all of these stages, the library dependencies were broken
because of how bsd.libnames.mk define DPADD members.
We still provide a glue to install bootstrap- and cross-tools
under the ${WORLDTMP}.
Removed PATH overrides for bootstrap-, build-, and cross-tools
stages. There is just no reason why we would need to override
it, and the hacks to clean up the ${WORLDTMP} in the -DNOCLEAN
case are no longer needed with fixes from this step.
That is, we now never use ${WORLDTMP} headers and libraries,
and we don't use any ${WORLDTMP} installed binaries during
these stages. Again, these stages depend solely on the host
environment, including compiler, headers, and libraries.
3. Moved "miniperl" back from cross-tools (it has nothing to do
with a cross-compiler) to build-tools where it belongs. The
change from step 1 let to do this. Also, to make this work,
build-tools targets of "cc_tools" and "miniperl" were modified
to call "depend". Here follow the detailed explanations.
There are two categories of build tools, for now. In the first
category there are "cc_tools" and "miniperl". They occupy the
whole (sub)directory, and nothing needs to be done in this
subdirectory later during the "all" stage. They are also
constructed using system makefiles. We must build the .depend
early in the build-tools stage because:
1) They use (and depend on) the host environment.
2) If we don't do this in build-tools, the "depend" stage of
buildworld will do this for us; wrong library and header
dependencies will be recorded (DESTDIR=${WORLDTMP}) and,
what's worse, the "all" stage may then clobber the
build-architecture format tools (that we built in the
build-tools stage) with the target-architecture format
ones, breaking cross build.
In the second category there are all other build-tools. They
share their directory with the "main" module that needs them
in the "all" stage, and they don't show up themselves in the
.depend file. The portion of this fix was already committed
in gnu/usr.bin/cc/cc_tools/Makefile,v 1.52.
4. "libperl" is no longer a build tool, and "miniperl" is the
stand-alone application. I had to make this change because
build-tools and "all" stages share the same object directory.
Without this change, if we cross compile, libperl.a is first
built for the build architecture during the build-tools stage
(for the purposes of immediate linkage with "miniperl").
Later on, the "all" stage sees this library as up-to-date,
and doesn't rebuild it. The effect is that the wrong format
static libperl library is installed with installworld.
5. Fixed "includes" to install secure/lib/libtelnet headers if
required.
Reviewed by: bde
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/perl/Makefile | 18 | ||||
-rw-r--r-- | gnu/usr.bin/perl/Makefile.inc | 7 | ||||
-rw-r--r-- | gnu/usr.bin/perl/libperl/Makefile | 3 | ||||
-rw-r--r-- | gnu/usr.bin/perl/library/Makefile.inc | 1 | ||||
-rw-r--r-- | gnu/usr.bin/perl/miniperl/Makefile | 31 | ||||
-rw-r--r-- | gnu/usr.bin/perl/pod/Makefile.inc | 1 | ||||
-rw-r--r-- | gnu/usr.bin/perl/x2p/Makefile.inc | 1 |
7 files changed, 22 insertions, 40 deletions
diff --git a/gnu/usr.bin/perl/Makefile b/gnu/usr.bin/perl/Makefile index fa1f636..b532310 100644 --- a/gnu/usr.bin/perl/Makefile +++ b/gnu/usr.bin/perl/Makefile @@ -1,23 +1,7 @@ # $FreeBSD$ -.ifmake !install && !distribute -_MINI= miniperl -.endif - -SUBDIR= libperl ${_MINI} perl suidperl library pod utils x2p BSDPAN +SUBDIR= libperl miniperl perl suidperl library pod utils x2p BSDPAN MAINTAINER=markm@freebsd.org -.BEGIN: -.ifmake depend || all - if [ \! -f ${.OBJDIR}/build-tools ] ; then \ - cd ${.CURDIR}/libperl && ${MAKE} depend && ${MAKE} all ; \ - cd ${.CURDIR}/miniperl && ${MAKE} depend && ${MAKE} all ; \ - touch ${.OBJDIR}/build-tools ; \ - fi -.endif -.ifmake cleandir || clean - @rm -f ${.OBJDIR}/build-tools -.endif - .include <bsd.subdir.mk> diff --git a/gnu/usr.bin/perl/Makefile.inc b/gnu/usr.bin/perl/Makefile.inc index 91e979c..91628f4 100644 --- a/gnu/usr.bin/perl/Makefile.inc +++ b/gnu/usr.bin/perl/Makefile.inc @@ -2,7 +2,12 @@ PERL5SRC?= ${.CURDIR}/../../../../contrib/perl5 PERL5LIBSRC?= ${.CURDIR}/../libperl -MINIPERL!= echo `PATH=$$PATH:${.OBJDIR}/../miniperl:${.OBJDIR}/../../miniperl which miniperl` + +.if exists(${.OBJDIR}/../miniperl/miniperl) +MINIPERL?= ${.OBJDIR}/../miniperl/miniperl +.else +MINIPERL?= ${.OBJDIR}/../../miniperl/miniperl +.endif BINDIR?= /usr/bin diff --git a/gnu/usr.bin/perl/libperl/Makefile b/gnu/usr.bin/perl/libperl/Makefile index 824ce61..55fb87a 100644 --- a/gnu/usr.bin/perl/libperl/Makefile +++ b/gnu/usr.bin/perl/libperl/Makefile @@ -19,9 +19,6 @@ NO_PERL_SCRIPT_MAKE= true .include <bsd.lib.mk> -build-tools: cleandepend - cd ${.CURDIR} && ${MAKE} lib${LIB}.a - config.h: links @sh config_h.sh diff --git a/gnu/usr.bin/perl/library/Makefile.inc b/gnu/usr.bin/perl/library/Makefile.inc index b339f00..6835a0a 100644 --- a/gnu/usr.bin/perl/library/Makefile.inc +++ b/gnu/usr.bin/perl/library/Makefile.inc @@ -2,7 +2,6 @@ PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5 PERL5LIBSRC?= ${.CURDIR}/../../libperl -MINIPERL= miniperl MODULEDIR?= ${MODULE} diff --git a/gnu/usr.bin/perl/miniperl/Makefile b/gnu/usr.bin/perl/miniperl/Makefile index cdc8bc1..9856964 100644 --- a/gnu/usr.bin/perl/miniperl/Makefile +++ b/gnu/usr.bin/perl/miniperl/Makefile @@ -2,20 +2,20 @@ PROG= miniperl NOMAN= true -CFLAGS+=-I${PERL5SRC} -I${.OBJDIR} -DPERL_EXTERNAL_GLOB -SRCS= miniperlmain.c opmini.c config.h +SRCS= miniperlmain.c +SRCS+= perl.c gv.c toke.c perly.c op.c regcomp.c dump.c util.c mg.c \ + hv.c av.c run.c pp_hot.c sv.c pp.c scope.c pp_ctl.c pp_sys.c \ + doop.c doio.c regexec.c utf8.c taint.c universal.c \ + xsutils.c globals.c perlio.c config.h +CFLAGS+=-I${.OBJDIR} -I${PERL5SRC} -DPERL_EXTERNAL_GLOB -DPERL_CORE +DPADD= ${LIBM} ${LIBCRYPT} +LDADD= -lm -lcrypt # Miniperl _must_ be static!! NOSHARED= yes -.if exists(${.OBJDIR}/../libperl/) -MYLIBPERL= ${.OBJDIR}/../libperl/libperl.a -.else -MYLIBPERL= ${.CURDIR}/../libperl/libperl.a -.endif -DPADD= ${MYLIBPERL} ${LIBM} ${LIBCRYPT} -LDADD= ${MYLIBPERL} -lm -lcrypt -build-tools: cleandepend - cd ${.CURDIR} && ${MAKE} ${PROG} +build-tools: depend ${PROG} + +install: NO_PERL_SCRIPT_MAKE= true @@ -23,10 +23,9 @@ NO_PERL_SCRIPT_MAKE= true .PATH: ${PERL5SRC} -opmini.c: op.c - ln -sf ${.OODATE} ${.TARGET} - -config.h: links +config.h: links @sh config_h.sh -CLEANFILES+= opmini.c config.h +.SUFFIXES: + +.SUFFIXES: .o .po .So .s .S .c diff --git a/gnu/usr.bin/perl/pod/Makefile.inc b/gnu/usr.bin/perl/pod/Makefile.inc index e030390..1e3cbfe 100644 --- a/gnu/usr.bin/perl/pod/Makefile.inc +++ b/gnu/usr.bin/perl/pod/Makefile.inc @@ -4,7 +4,6 @@ PERL5SRC?= ${.CURDIR}/../../../../../contrib/perl5 MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl -MINIPERL= miniperl CLEANFILES+= ${PROG}.1 ${PROG}.PL diff --git a/gnu/usr.bin/perl/x2p/Makefile.inc b/gnu/usr.bin/perl/x2p/Makefile.inc index b7a7fef..7f8371c 100644 --- a/gnu/usr.bin/perl/x2p/Makefile.inc +++ b/gnu/usr.bin/perl/x2p/Makefile.inc @@ -5,7 +5,6 @@ PERL5SRC= ${.CURDIR}/../../../../../contrib/perl5 PERL5LIBSRC= ${.CURDIR}/../../libperl MINIPERLOPT?= -I${.OBJDIR}/../../perl/lib -I${.OBJDIR}/../../perl -MINIPERL= miniperl LDFLAGS+= -L${.OBJDIR}/../../libperl |