Commit da9e56ab authored by Colin Watson's avatar Colin Watson

Use correct compiler and strip when cross-building.

parent b6ccbe52
......@@ -10,6 +10,8 @@ else
CFLAGS:=$(CFLAGS) -Os -fomit-frame-pointer
endif
STRIP := strip
all: $(TARGETS)
pkgdetails: pkgdetails.c
......@@ -20,7 +22,7 @@ run-debootstrap: run-debootstrap.c
small: CFLAGS:=-Os $(CFLAGS)
small: $(TARGETS)
strip --remove-section=.comment --remove-section=.note $^
$(STRIP) --remove-section=.comment --remove-section=.note $^
ls -l $^
clean:
......
base-installer (1.131) UNRELEASED; urgency=low
* Use correct compiler and strip when cross-building.
-- Colin Watson <cjwatson@debian.org> Wed, 09 Jan 2013 11:29:06 +0000
base-installer (1.130) unstable; urgency=low
[ Milan Kupcevic ]
......
......@@ -2,17 +2,23 @@
%:
dh $@
ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE))
CROSS := CC=$(DEB_HOST_GNU_TYPE)-gcc STRIP=$(DEB_HOST_GNU_TYPE)-strip
endif
override_dh_auto_build: debian/templates.gen
ifeq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
$(MAKE) small
$(MAKE) small $(CROSS)
else
$(MAKE) DEBUG=1
$(MAKE) DEBUG=1 $(CROSS)
endif
debian/templates.gen: debian/templates-arch
debian/templates-build.pl $(ARCH) < $< > $@
debian/templates-build.pl $(DEB_HOST_ARCH) < $< > $@
# give the new templates file the same mtime as the input file, so
# that po2debconf doesn't decide that it needs to run
# debconf-updatepo
......@@ -23,8 +29,8 @@ test:
override_dh_install:
dh_install
if [ -e "kernel/$(ARCH).sh" ]; then \
install -D -m644 "kernel/$(ARCH).sh" \
if [ -e "kernel/$(DEB_HOST_ARCH).sh" ]; then \
install -D -m644 "kernel/$(DEB_HOST_ARCH).sh" \
debian/bootstrap-base/usr/lib/base-installer/kernel.sh; \
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment