tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

sanitizing the environment



After my changes for cross-compilation, TARGET_ARCH for tool depends
bleeds into child environments, which causes gmake's default rules to
pass it to the C compiler thinking that it will be something like
`-m32', not `i386'.  This is the cause of recent build failures for
sysutils/openssl (PR 47838).  How can I keep TARGET_ARCH out of child
environments but still pass it along in pkgsrc make?


Currently, _DEPENDS_INSTALL_CMD in mk/pkgformat/pkg/depends.mk passes
USE_CROSS_COMPILE=no TARGET_ARCH=${MACHINE_ARCH} in the environment
when recursively making a tool dependency.

- Passing it in the make arguments might be a better choice but still
causes the settings to bleed into child environments.

- Passing it only when we are cross-compiling would work around the
symptom in PR 47838, but wouldn't solve the problem: cross-compiling
would still fail this way.

- Replacing TARGET_ARCH by TARGET_MACHINE_PLATFORM -- which I intend
to do anyway at some point -- would work around the symptom too, but
is not a real fix either.

- Setting `PKGSRC_SETENV= ${SETENV} -i' would probably fix this, but
that option seems to have bitrotted and I'm not immediately clear on
why.

Any other ideas?



Home | Main Index | Thread Index | Old Index