Add --target option for cross builds

Bug #645373 reported by Marcin Juszkiewicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gmp (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

"dpkg-buildpackage -aarmel -b" ends with:

 debian/rules build
mkdir -p build
cd build && ../configure --prefix=/usr --enable-cxx --enable-mpbsd --enable-fat --build x86_64-linux-gnu --host arm-linux-gnueabi \
            AR= arm-linux-gnueabi-ar CC=" arm-linux-gnueabi-gcc" CFLAGS="-Wall -g -D_REENTRANT -O3 -Wa,--defsym,USES_THUMB=1" \
            CXX=" arm-linux-gnueabi-g++" CXXFLAGS="-g -O2"
configure: WARNING: you should use --build, --host, --target
configure: error: --target is not appropriate for GMP
Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system
explicitly. Use --host if cross-compiling (see "Installing GMP" in the
manual for more on this).
make: *** [configure-stamp] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2

So I added --target option in debian/rules to pass that:

18:24 hrw@home:debian$ diff rules.orgi rules -u
--- rules.orgi 2010-09-22 18:24:37.806068998 +0200
+++ rules 2010-09-22 18:24:40.836068986 +0200
@@ -52,7 +52,7 @@
   confflags_build += --build $(DEB_BUILD_GNU_TYPE)
 else
   AR = $(DEB_HOST_GNU_TYPE)-ar
- confflags_build += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+ confflags_build += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) --target $(DEB_HOST_GNU_TYPE)
 endif

 ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 ppc64 kfreebsd-amd64))

And it builds. There is a problem with libtool so it does not finish but with this fix it at least passes configure step.

Tags: patch
Marcin Juszkiewicz (hrw)
Changed in gmp (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.