UBUNTU: [Config] Force perf to use libiberty for demangling
[linux-flexiantxendom0-natty.git] / debian / rules.d / 2-binary-arch.mk
index 9b9123b..876a980 100644 (file)
@@ -54,24 +54,25 @@ install-%: $(stampdir)/stamp-build-% checks-%
        # compress_file logic required because not all architectures
        # generate a zImage automatically out of the box
 ifeq ($(compress_file),)
-       install -m644 -D $(builddir)/build-$*/$(kernel_file) \
+       install -m600 -D $(builddir)/build-$*/$(kernel_file) \
                $(pkgdir)/boot/$(install_file)-$(abi_release)-$*
 else
        install -d $(pkgdir)/boot
        gzip -c9v $(builddir)/build-$*/$(kernel_file) > \
                $(pkgdir)/boot/$(install_file)-$(abi_release)-$*
-       chmod 644 $(pkgdir)/boot/$(install_file)-$(abi_release)-$*
+       chmod 600 $(pkgdir)/boot/$(install_file)-$(abi_release)-$*
 endif
 
        install -m644 $(builddir)/build-$*/.config \
                $(pkgdir)/boot/config-$(abi_release)-$*
        install -m644 $(abidir)/$* \
                $(pkgdir)/boot/abi-$(abi_release)-$*
-       install -m644 $(builddir)/build-$*/System.map \
+       install -m600 $(builddir)/build-$*/System.map \
                $(pkgdir)/boot/System.map-$(abi_release)-$*
 ifeq ($(no_dumpfile),)
        makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
                -x $(builddir)/build-$*/vmlinux
+       chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$*
 endif
 
        $(build_cd) $(kmake) $(build_O) modules_install \
@@ -92,6 +93,7 @@ endif
 ifeq ($(no_dumpfile),)
        makedumpfile -g $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$* \
                -x $(builddir)/build-$*/vmlinux
+       chmod 0600 $(pkgdir)/boot/vmcoreinfo-$(abi_release)-$*
 endif
        rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/build
        rm -f $(pkgdir)/lib/modules/$(abi_release)-$*/source
@@ -243,6 +245,8 @@ install-arch-headers:
                find . -name '.' -o -name '.*' -prune -o -print | \
                 cpio -pvd --preserve-modification-time \
                        $(headers_dir)/usr/include/ )
+       mkdir $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)
+       mv $(headers_dir)/usr/include/asm $(headers_dir)/usr/include/$(DEB_HOST_MULTIARCH)/
 
        rm -rf $(headers_tmp)
 
@@ -275,7 +279,7 @@ binary-%: install-%
        dh_installchangelogs -p$(pkgimg)
        dh_installdocs -p$(pkgimg)
        dh_compress -p$(pkgimg)
-       dh_fixperms -p$(pkgimg)
+       dh_fixperms -p$(pkgimg) -X/boot/
        dh_installdeb -p$(pkgimg)
        dh_shlibdeps -p$(pkgimg)
        dh_gencontrol -p$(pkgimg)
@@ -298,7 +302,7 @@ ifneq ($(skipsub),true)
                dh_installchangelogs -p$$pkg;           \
                dh_installdocs -p$$pkg;                 \
                dh_compress -p$$pkg;                    \
-               dh_fixperms -p$$pkg;                    \
+               dh_fixperms -p$$pkg -X/boot/;           \
                dh_shlibdeps -p$$pkg;                   \
                dh_installdeb -p$$pkg;                  \
                dh_gencontrol -p$$pkg;                  \
@@ -351,6 +355,7 @@ $(stampdir)/stamp-flavours:
 $(stampdir)/stamp-prepare-perarch:
        @echo "Preparing perarch ..."
 ifeq ($(do_tools),true)
+       rm -rf $(builddir)/tools-$*
        install -d $(builddir)/tools-$*
        for i in *; do ln -s $(CURDIR)/$$i $(builddir)/tools-$*/; done
        rm $(builddir)/tools-$*/tools
@@ -360,7 +365,8 @@ endif
 
 $(stampdir)/stamp-build-perarch: prepare-perarch
 ifeq ($(do_tools),true)
-       cd $(builddir)/tools-$*/tools/perf && make $(CROSS_COMPILE)
+       cd $(builddir)/tools-$*/tools/perf && \
+               make HAVE_CPLUS_DEMANGLE=1 $(CROSS_COMPILE)
 endif
        @touch $@