Help needed to cross-build gcl27
Hi,
gcl27 hard-codes CC as gcc so the first bit was quite easy to get through (patch so far pasted
at the end of the mail).
The next failure is:
| checking for setjmp.h... yes
| checking sizeof jmp_buf... configure: error: in '/build/reproducible-path/gcl27-2.7.1':
| configure: error: cannot run test program while cross compiling
| See 'config.log' for more details
| make: *** [debian/rules:65: configure-stamp] Error 1
The configure script runs several tiny test programs to get info in bits and pieces. The above
is to get sizeof jmp. And the configure script has a hard fail if its cross building.
This is a pattern that I've seen in a few other packages as well that I looked at in the
past days. Is there a way around it?
Thanks
Nilesh
diff --git a/debian/rules b/debian/rules
index ffe6181..0a74215 100755
--- a/debian/rules
+++ b/debian/rules
@@ -13,6 +13,7 @@
#export GCL_MEM_MULTIPLE=0.1
# This has to be exported to make some magic below work.
+include /usr/share/dpkg/buildtools.mk
export DH_OPTIONS
ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
@@ -27,7 +28,7 @@ endif
# This is the debhelper compatability version to use.
ARCHT:=$(shell dpkg-architecture -qDEB_HOST_ARCH)
-MCC?=gcc
+# MCC?=gcc
# ifeq ($(ARCHT),alpha)
# MCC:=gcc-4.6
# endif
@@ -64,7 +65,7 @@ configure-stamp:
dh_autoreconf
eval `dpkg-buildflags --export=sh` && \
- CC=$(MCC) CFLAGS="$$CFLAGS $(CFLAGS_APPEND)" ./configure \
+ CC=$(CC) CFLAGS="$$CFLAGS $(CFLAGS_APPEND)" ./configure \
--host=$$(dpkg-architecture -qDEB_HOST_GNU_TYPE) \
$(DEBUG) \
--prefix=/usr
Reply to: