[Pkg-openssl-devel] Bug#465248: Bug#465248: long term mass bug filing for cross

Kurt Roeckx kurt at roeckx.be
Sun Jan 26 15:57:38 UTC 2014


On Sun, Jan 26, 2014 at 02:39:05PM +0000, Christian Svensson wrote:
> Hi,
> 
> 6 years later this patch is still very much needed.
> Please apply this patch.

Please provide me with a properly tested patch that actually makes
sense.

So what should this patch look like?  It is just:
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export CC=$(DEB_HOST_GNU_TYPE)-gcc

This assumes that the compiler is going to be gcc.  But there are
other compilers than gcc.

As far as I know, what really should happen is that you either
set the CROSS_COMPILE environment or pass --cross-compile-prefix
to Configure so that tools like nm also get the version for the
host architecture.

So this might work:
export CROSS_COMPILE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)-

But then it actually fails with:
make[2]: x86_64-linux-gnu-ar: Command not found

So maybe it should be:
DEB_HOST_GNU_TYPE=$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE=$(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
        export CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)-
endif

But then you might not like that it's doing something different when
cross compiling, and I don't have a test environment to check
that this actually works.


Kurt



More information about the Pkg-openssl-devel mailing list