> configure complains bitterly that using --host is the wrong way to do
> cross-compilation, and that it will automatically detect an attempt at
> cross-compilation.
Err... I see. The configure warns when we specify --host for native
build. We need to handle native build case.
It's not true that it will automatically detect cross compilation.
When we don't specify --host for cross compilation (just specify CC
variable), it compilains:
checking whether the C compiler works... configure: error: cannot run C
compiled programs.
If you meant to cross compile, use `--host'.
Well, specifying --host itself is right way. But yes, there are many
misunderstandings in the past between --host and --build. Configure
warns when --host is specified on native build.
I think that we can ignore this warning. Specifying --build along with
--host can kill this warning.
Following change works both of native and cross build.
Note:
There are three things: host, build, and target.
HOST: The machine where the executable will run.
BUILD: The machine where the executable is about to be built.
TARGET: The machine where the executable will target.
(Only valid for development tool, such as compiler,
assembler, linker.)
diff -u popt-1.10/debian/rules popt-1.10/debian/rules
--- popt-1.10/debian/rules
+++ popt-1.10/debian/rules
@@ -6,6 +6,7 @@
#export DH_VERBOSE=1
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
# shared library versions, option 1
source = $(shell grep "^Source: " debian/control|head -1|sed 's/Source:
\(.*\)/\1/g')
@@ -49,8 +50,8 @@
ln mkinstalldirs $(objdir)
# Add here commands to configure the package.
cd $(objdir) && \
- ../configure --prefix=/usr --mandir=/usr/share/man --enable-shared
- # --host=$(DEB_HOST_GNU_TYPE)
+ ../configure --prefix=/usr --mandir=/usr/share/man --enable-shared \
+ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
touch $@
configure-udeb-stamp:
@@ -64,8 +65,8 @@
ln mkinstalldirs $(objdir_udeb)
# Add here commands to configure the package.
cd $(objdir_udeb) && \
- ../configure --prefix=/usr --mandir=/usr/share/man --enable-shared
- # --host=$(DEB_HOST_GNU_TYPE)
+ ../configure --prefix=/usr --mandir=/usr/share/man --enable-shared \
+ --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE)
touch $@
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]