[Pkg-uml-pkgs] failed i386 build of user-mode-linux 4.7-1um-2
Mattia Dongili
malattia at linux.it
Mon Oct 31 13:50:12 UTC 2016
On Mon, Oct 31, 2016 at 12:04:58AM +0530, Ritesh Raj Sarraf wrote:
> Hello Mattia,
>
> In my opinion, the best fix for this issue seems to be to build the kernel with
> gcc-5. I propose the changes (patch attached). The same approach is what the
> Debian Kernel team too has taken.
>
> I have built the UML kernel successfully on both the architectures, with the
> proposed patch.
>
> Please let me know what you think. I have not pushed the change yet. Will do
> after an ack from you.
I'm fine with building using gcc-5 for now.
...
> diff --git a/debian/rules b/debian/rules
> index 2bdfad8..d3fca06 100755
> --- a/debian/rules
> +++ b/debian/rules
> @@ -16,29 +16,26 @@ DEB_HOST_ARCH?=$(shell dpkg-architecture -qDEB_HOST_ARCH)
> #SUBARCH?=$(shell uname -m)
>
> ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
> -CFLAGS_KERNEL += -O1
> +KBUILDVARS := CFLAGS_KERNEL=-O1
> endif
>
> -KBUILDVARS := CFLAGS_KERNEL="$(CFLAGS_KERNEL)" CC="$(CC) -no-pie"
> -LD="$(LD) -no-pie"
> -
> # development only targets
> #
> copy-config:
> cp config.$(DEB_HOST_ARCH) $(kernel_src)/.config
>
> oldconfig32: unpack copy-config
> - make -C $(kernel_src) oldconfig ARCH=um SUBARCH=i386
> + make -C $(kernel_src) oldconfig CC=gcc-5 ARCH=um SUBARCH=i386
I'd set up a variable and then use the variable in all places. Either
way, it'll work.
> cp config.i386 config.i386.oldconfig.old
> cp $(kernel_src)/.config config.i386
>
> oldconfig64: unpack copy-config
> - make -C $(kernel_src) oldconfig ARCH=um SUBARCH=x86_64
> + make -C $(kernel_src) oldconfig CC=gcc-5 ARCH=um SUBARCH=x86_64
> cp config.amd64 config.amd64.oldconfig.old
> cp $(kernel_src)/.config config.amd64
>
> menuconfig: unpack copy-config
> - make -C $(kernel_src) menuconfig ARCH=um
> + make -C $(kernel_src) menuconfig CC=gcc-5 ARCH=um
> cp config.$(DEB_HOST_ARCH) config.$(DEB_HOST_ARCH).menuconfig.old
> cp $(kernel_src)/.config config.$(DEB_HOST_ARCH)
>
> @@ -63,7 +60,7 @@ configure: configure-stamp
> configure-stamp: patch-stamp $(kernel_src)/.config
> dh_testdir
>
> - $(MAKE) -C $(kernel_src) $(config_target) ARCH=um
> + $(MAKE) -C $(kernel_src) $(config_target) CC=gcc-5 ARCH=um
>
> touch $@
>
> @@ -75,7 +72,7 @@ build-indep: build-stamp
> build-stamp: configure
> dh_testdir
>
> - $(MAKE) -C $(kernel_src) $(KBUILDVARS) linux modules ARCH=um
> + $(MAKE) -C $(kernel_src) $(KBUILDVARS) linux modules CC=gcc-5 ARCH=um
> docbook-to-man linux.sgml > linux.uml.1
>
> touch $@
> @@ -108,6 +105,7 @@ endif
> install $(kernel_src)/linux $(tmp)/usr/bin/linux.uml
>
> $(MAKE) -C $(kernel_src) modules_install \
> + CC=gcc-5 \
> ARCH=um \
> INSTALL_MOD_PATH=$(tmpmodules) \
> INSTALL_MOD_STRIP=$(MODSTRIP)
--
mattia
:wq!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-uml-pkgs/attachments/20161031/de658baf/attachment.sig>
More information about the Pkg-uml-pkgs
mailing list