tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: cross-compiling textproc/icu
> On Sep 21, 2023, at 11:08 AM, Taylor R Campbell <campbell+netbsd-tech-pkg%mumble.net@localhost> wrote:
>
>> Date: Thu, 14 Sep 2023 14:42:33 -0600
>> From: Brook Milligan <brook%nmsu.edu@localhost>
>>
>> To cross-compile, textproc/icu must be configured with
>> —with-cross-build= pointing to a pre-compiled native version
>> of the icu source tree. Thus, two compilations are required: (i) a
>> native build and (ii) a cross build.
>
> I haven't tried cross-building textproc/icu before, it seems. Does
> the installation prefix have enough for the cross-build, or is it
> necessary to actually use a native build's work directory?
Yes, it really requires the built work directory. Specifically, ${WRKSRC}/source. In the case of cross-builds, there are configure checks for a *.mk file there.
>> Should the cross build extract twice and build twice?
>
> If icu really requires the native build's work directory, then I'm
> afraid we might have to do something like that.
>
> (I'll take a closer look when I have some time.)
All comments I can find on the web indicate that building twice is necessary. I have succeeded in cross-building boost-libs (which depends on icu) by first building icu natively and storing the ${WRKSRC}/source directory somewhere, cleaning it, and then cross-building boost-libs, which cross-builds icu. All that is needed for the latter is the —with-cross-build= pointing to the native icu stuff, which is easy to make happen with a make conditional dependent on USE_CROSS_COMPILER (see below).
However, I have not yet figured out how to make a build of icu with USE_CROSS_COMPILER=yes build itself twice. For example, my naive try adding the following to the icu/Makefile does not work:
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
CONFIGURE_ARGS+= --with-cross-build=/tmp/icu_source-native
.endif
.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
pre-extract:
${MAKE} ${BUILD_TARGET} USE_CROSS_COMPILE=no
${MV} ${WRKSRC}/source ${WRKDIR}/icu_source-native
${MAKE} clean
.endif
Please suggest ways to build a package twice, once each with two different sets of CONFIGURE_ARGS.
Thanks a lot.
Cheers,
Brook
Home |
Main Index |
Thread Index |
Old Index