All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] need to export variables in config.mak
@ 2011-09-30 17:07 ` Chris Friesen
  0 siblings, 0 replies; 13+ messages in thread
From: Chris Friesen @ 2011-09-30 17:07 UTC (permalink / raw)
  To: kvm, qemu-devel, Avi Kivity, Jan Kiszka

We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile environment, and one of my coworkers noticed that the variables in config.mak weren't actually exported and so didn't actually have any effect.

I think something like the following patch is required.

Thanks,
Chris Friesen



Index: kvm-kmod-3.0b/configure
===================================================================
--- kvm-kmod-3.0b.orig/configure	2011-09-27 15:12:08.000009000 -0500
+++ kvm-kmod-3.0b/configure	2011-09-27 15:11:59.001566000 -0500
@@ -168,24 +168,24 @@ fi
 rm -f include/asm include-compat/asm
 mkdir -p include
 ln -sf asm-"$karch" include/asm
 ln -sf asm-"$karch" include-compat/asm
 
 cat <<EOF > config.mak
-ARCH=$arch
-PROCESSOR=$processor
-PREFIX=$prefix
-KERNELDIR=$kerneldir
-KERNELSOURCEDIR=$kernelsourcedir
-KERNELVERSION=$kernel_version_str
-CROSS_COMPILE=$cross_prefix
-CC=$cross_prefix$cc
-LD=$cross_prefix$ld
-OBJCOPY=$cross_prefix$objcopy
-AR=$cross_prefix$ar
-KVM_VERSION=$(kvm_version)
+export ARCH=$arch
+export PROCESSOR=$processor
+export PREFIX=$prefix
+export KERNELDIR=$kerneldir
+export KERNELSOURCEDIR=$kernelsourcedir
+export KERNELVERSION=$kernel_version_str
+export CROSS_COMPILE=$cross_prefix
+export CC=$cross_prefix$cc
+export LD=$cross_prefix$ld
+export OBJCOPY=$cross_prefix$objcopy
+export AR=$cross_prefix$ar
+export KVM_VERSION=$(kvm_version)
 EOF
 
 cat <<EOF > kvm-kmod-config.h
 #define KERNEL_EXTRAVERSION $kernel_extraversion
 $config_fedora_kernel
 EOF








-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [BUG] need to export variables in config.mak
@ 2011-09-30 17:07 ` Chris Friesen
  0 siblings, 0 replies; 13+ messages in thread
From: Chris Friesen @ 2011-09-30 17:07 UTC (permalink / raw)
  To: kvm, qemu-devel, Avi Kivity, Jan Kiszka

We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile environment, and one of my coworkers noticed that the variables in config.mak weren't actually exported and so didn't actually have any effect.

I think something like the following patch is required.

Thanks,
Chris Friesen



Index: kvm-kmod-3.0b/configure
===================================================================
--- kvm-kmod-3.0b.orig/configure	2011-09-27 15:12:08.000009000 -0500
+++ kvm-kmod-3.0b/configure	2011-09-27 15:11:59.001566000 -0500
@@ -168,24 +168,24 @@ fi
 rm -f include/asm include-compat/asm
 mkdir -p include
 ln -sf asm-"$karch" include/asm
 ln -sf asm-"$karch" include-compat/asm
 
 cat <<EOF > config.mak
-ARCH=$arch
-PROCESSOR=$processor
-PREFIX=$prefix
-KERNELDIR=$kerneldir
-KERNELSOURCEDIR=$kernelsourcedir
-KERNELVERSION=$kernel_version_str
-CROSS_COMPILE=$cross_prefix
-CC=$cross_prefix$cc
-LD=$cross_prefix$ld
-OBJCOPY=$cross_prefix$objcopy
-AR=$cross_prefix$ar
-KVM_VERSION=$(kvm_version)
+export ARCH=$arch
+export PROCESSOR=$processor
+export PREFIX=$prefix
+export KERNELDIR=$kerneldir
+export KERNELSOURCEDIR=$kernelsourcedir
+export KERNELVERSION=$kernel_version_str
+export CROSS_COMPILE=$cross_prefix
+export CC=$cross_prefix$cc
+export LD=$cross_prefix$ld
+export OBJCOPY=$cross_prefix$objcopy
+export AR=$cross_prefix$ar
+export KVM_VERSION=$(kvm_version)
 EOF
 
 cat <<EOF > kvm-kmod-config.h
 #define KERNEL_EXTRAVERSION $kernel_extraversion
 $config_fedora_kernel
 EOF








-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] need to export variables in config.mak
  2011-09-30 17:07 ` [Qemu-devel] " Chris Friesen
@ 2011-09-30 17:12   ` Jan Kiszka
  -1 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2011-09-30 17:12 UTC (permalink / raw)
  To: Chris Friesen; +Cc: qemu-devel, kvm, Avi Kivity

On 2011-09-30 19:07, Chris Friesen wrote:
> We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile environment, and one of my coworkers noticed that the variables in config.mak weren't actually exported and so didn't actually have any effect.
> 
> I think something like the following patch is required.

If you can confirm that they have the right effect and put a signed-off
+ description to the patch, I'll merge it.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [BUG] need to export variables in config.mak
@ 2011-09-30 17:12   ` Jan Kiszka
  0 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2011-09-30 17:12 UTC (permalink / raw)
  To: Chris Friesen; +Cc: qemu-devel, kvm, Avi Kivity

On 2011-09-30 19:07, Chris Friesen wrote:
> We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile environment, and one of my coworkers noticed that the variables in config.mak weren't actually exported and so didn't actually have any effect.
> 
> I think something like the following patch is required.

If you can confirm that they have the right effect and put a signed-off
+ description to the patch, I'll merge it.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH] need to export variables in config.mak
  2011-09-30 17:12   ` [Qemu-devel] " Jan Kiszka
@ 2011-09-30 17:40     ` Chris Friesen
  -1 siblings, 0 replies; 13+ messages in thread
From: Chris Friesen @ 2011-09-30 17:40 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: kvm, qemu-devel, Avi Kivity

The variables being written to config.mak by configure
need to be exported in order to take effect when building
the package.

The following patch fixes this in our environment.

Signed-off-by: Chris Friesen <chris.friesen@genband.com>


Index: kvm-kmod-3.0b/configure
===================================================================
--- kvm-kmod-3.0b.orig/configure	2011-09-27 15:12:08.000009000 -0500
+++ kvm-kmod-3.0b/configure	2011-09-27 15:11:59.001566000 -0500
@@ -168,24 +168,24 @@ fi
 rm -f include/asm include-compat/asm
 mkdir -p include
 ln -sf asm-"$karch" include/asm
 ln -sf asm-"$karch" include-compat/asm
 
 cat <<EOF > config.mak
-ARCH=$arch
-PROCESSOR=$processor
-PREFIX=$prefix
-KERNELDIR=$kerneldir
-KERNELSOURCEDIR=$kernelsourcedir
-KERNELVERSION=$kernel_version_str
-CROSS_COMPILE=$cross_prefix
-CC=$cross_prefix$cc
-LD=$cross_prefix$ld
-OBJCOPY=$cross_prefix$objcopy
-AR=$cross_prefix$ar
-KVM_VERSION=$(kvm_version)
+export ARCH=$arch
+export PROCESSOR=$processor
+export PREFIX=$prefix
+export KERNELDIR=$kerneldir
+export KERNELSOURCEDIR=$kernelsourcedir
+export KERNELVERSION=$kernel_version_str
+export CROSS_COMPILE=$cross_prefix
+export CC=$cross_prefix$cc
+export LD=$cross_prefix$ld
+export OBJCOPY=$cross_prefix$objcopy
+export AR=$cross_prefix$ar
+export KVM_VERSION=$(kvm_version)
 EOF
 
 cat <<EOF > kvm-kmod-config.h
 #define KERNEL_EXTRAVERSION $kernel_extraversion
 $config_fedora_kernel
 EOF





-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Qemu-devel] [PATCH] need to export variables in config.mak
@ 2011-09-30 17:40     ` Chris Friesen
  0 siblings, 0 replies; 13+ messages in thread
From: Chris Friesen @ 2011-09-30 17:40 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel, kvm, Avi Kivity

The variables being written to config.mak by configure
need to be exported in order to take effect when building
the package.

The following patch fixes this in our environment.

Signed-off-by: Chris Friesen <chris.friesen@genband.com>


Index: kvm-kmod-3.0b/configure
===================================================================
--- kvm-kmod-3.0b.orig/configure	2011-09-27 15:12:08.000009000 -0500
+++ kvm-kmod-3.0b/configure	2011-09-27 15:11:59.001566000 -0500
@@ -168,24 +168,24 @@ fi
 rm -f include/asm include-compat/asm
 mkdir -p include
 ln -sf asm-"$karch" include/asm
 ln -sf asm-"$karch" include-compat/asm
 
 cat <<EOF > config.mak
-ARCH=$arch
-PROCESSOR=$processor
-PREFIX=$prefix
-KERNELDIR=$kerneldir
-KERNELSOURCEDIR=$kernelsourcedir
-KERNELVERSION=$kernel_version_str
-CROSS_COMPILE=$cross_prefix
-CC=$cross_prefix$cc
-LD=$cross_prefix$ld
-OBJCOPY=$cross_prefix$objcopy
-AR=$cross_prefix$ar
-KVM_VERSION=$(kvm_version)
+export ARCH=$arch
+export PROCESSOR=$processor
+export PREFIX=$prefix
+export KERNELDIR=$kerneldir
+export KERNELSOURCEDIR=$kernelsourcedir
+export KERNELVERSION=$kernel_version_str
+export CROSS_COMPILE=$cross_prefix
+export CC=$cross_prefix$cc
+export LD=$cross_prefix$ld
+export OBJCOPY=$cross_prefix$objcopy
+export AR=$cross_prefix$ar
+export KVM_VERSION=$(kvm_version)
 EOF
 
 cat <<EOF > kvm-kmod-config.h
 #define KERNEL_EXTRAVERSION $kernel_extraversion
 $config_fedora_kernel
 EOF





-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [BUG] need to export variables in config.mak
  2011-09-30 17:07 ` [Qemu-devel] " Chris Friesen
@ 2011-09-30 17:52   ` Richard Henderson
  -1 siblings, 0 replies; 13+ messages in thread
From: Richard Henderson @ 2011-09-30 17:52 UTC (permalink / raw)
  To: Chris Friesen; +Cc: kvm, qemu-devel, Avi Kivity, Jan Kiszka

On 09/30/2011 10:07 AM, Chris Friesen wrote:
> We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile
> environment, and one of my coworkers noticed that the variables in
> config.mak weren't actually exported and so didn't actually have any
> effect.

Please elaborate on "no effect", and what actual problems you are
experiencing.  I do cross-compilation builds all the time and have
no such problems.


r~

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [BUG] need to export variables in config.mak
@ 2011-09-30 17:52   ` Richard Henderson
  0 siblings, 0 replies; 13+ messages in thread
From: Richard Henderson @ 2011-09-30 17:52 UTC (permalink / raw)
  To: Chris Friesen; +Cc: Jan Kiszka, qemu-devel, kvm, Avi Kivity

On 09/30/2011 10:07 AM, Chris Friesen wrote:
> We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile
> environment, and one of my coworkers noticed that the variables in
> config.mak weren't actually exported and so didn't actually have any
> effect.

Please elaborate on "no effect", and what actual problems you are
experiencing.  I do cross-compilation builds all the time and have
no such problems.


r~

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [BUG] need to export variables in config.mak
  2011-09-30 17:52   ` Richard Henderson
  (?)
@ 2011-09-30 18:00   ` Alexander Graf
  -1 siblings, 0 replies; 13+ messages in thread
From: Alexander Graf @ 2011-09-30 18:00 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Chris Friesen, Jan Kiszka, qemu-devel, kvm, Avi Kivity


Am 30.09.2011 um 19:52 schrieb Richard Henderson <rth@twiddle.net>:

> On 09/30/2011 10:07 AM, Chris Friesen wrote:
>> We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile
>> environment, and one of my coworkers noticed that the variables in
>> config.mak weren't actually exported and so didn't actually have any
>> effect.
> 
> Please elaborate on "no effect", and what actual problems you are
> experiencing.  I do cross-compilation builds all the time and have
> no such problems.

You cross-compile kvm-kmod?

Alex
> 

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [BUG] need to export variables in config.mak
  2011-09-30 17:52   ` Richard Henderson
@ 2011-09-30 18:14     ` Chris Friesen
  -1 siblings, 0 replies; 13+ messages in thread
From: Chris Friesen @ 2011-09-30 18:14 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Jan Kiszka, qemu-devel, kvm, Avi Kivity

On 09/30/2011 11:52 AM, Richard Henderson wrote:
> On 09/30/2011 10:07 AM, Chris Friesen wrote:
>> We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile
>> environment, and one of my coworkers noticed that the variables in
>> config.mak weren't actually exported and so didn't actually have any
>> effect.
>
> Please elaborate on "no effect", and what actual problems you are
> experiencing.  I do cross-compilation builds all the time and have
> no such problems.

The behaviour I see is that I configure with --cross-prefix=<prefix> 
then the appropriate prefix gets set in config.mak.  However, when 
running "make" the prefix doesn't actually get used.

If building for the same target as the host machine this isn't 
immediately obvious because it uses the host compiler.  However, if you 
run "make V=1" it will show which compiler is being used.

Chris

-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [BUG] need to export variables in config.mak
@ 2011-09-30 18:14     ` Chris Friesen
  0 siblings, 0 replies; 13+ messages in thread
From: Chris Friesen @ 2011-09-30 18:14 UTC (permalink / raw)
  To: Richard Henderson; +Cc: Jan Kiszka, qemu-devel, kvm, Avi Kivity

On 09/30/2011 11:52 AM, Richard Henderson wrote:
> On 09/30/2011 10:07 AM, Chris Friesen wrote:
>> We've been playing a bit with kvm-kmod-3.0b.  We use a cross compile
>> environment, and one of my coworkers noticed that the variables in
>> config.mak weren't actually exported and so didn't actually have any
>> effect.
>
> Please elaborate on "no effect", and what actual problems you are
> experiencing.  I do cross-compilation builds all the time and have
> no such problems.

The behaviour I see is that I configure with --cross-prefix=<prefix> 
then the appropriate prefix gets set in config.mak.  However, when 
running "make" the prefix doesn't actually get used.

If building for the same target as the host machine this isn't 
immediately obvious because it uses the host compiler.  However, if you 
run "make V=1" it will show which compiler is being used.

Chris

-- 
Chris Friesen
Software Developer
GENBAND
chris.friesen@genband.com
www.genband.com

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [PATCH] need to export variables in config.mak
  2011-09-30 17:40     ` [Qemu-devel] " Chris Friesen
@ 2011-10-03  7:57       ` Jan Kiszka
  -1 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2011-10-03  7:57 UTC (permalink / raw)
  To: Chris Friesen; +Cc: qemu-devel, kvm, Avi Kivity

[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]

On 2011-09-30 19:40, Chris Friesen wrote:
> The variables being written to config.mak by configure
> need to be exported in order to take effect when building
> the package.
> 
> The following patch fixes this in our environment.
> 
> Signed-off-by: Chris Friesen <chris.friesen@genband.com>
> 
> 
> Index: kvm-kmod-3.0b/configure
> ===================================================================
> --- kvm-kmod-3.0b.orig/configure	2011-09-27 15:12:08.000009000 -0500
> +++ kvm-kmod-3.0b/configure	2011-09-27 15:11:59.001566000 -0500
> @@ -168,24 +168,24 @@ fi
>  rm -f include/asm include-compat/asm
>  mkdir -p include
>  ln -sf asm-"$karch" include/asm
>  ln -sf asm-"$karch" include-compat/asm
>  
>  cat <<EOF > config.mak
> -ARCH=$arch
> -PROCESSOR=$processor
> -PREFIX=$prefix
> -KERNELDIR=$kerneldir
> -KERNELSOURCEDIR=$kernelsourcedir
> -KERNELVERSION=$kernel_version_str
> -CROSS_COMPILE=$cross_prefix
> -CC=$cross_prefix$cc
> -LD=$cross_prefix$ld
> -OBJCOPY=$cross_prefix$objcopy
> -AR=$cross_prefix$ar
> -KVM_VERSION=$(kvm_version)
> +export ARCH=$arch
> +export PROCESSOR=$processor
> +export PREFIX=$prefix
> +export KERNELDIR=$kerneldir
> +export KERNELSOURCEDIR=$kernelsourcedir
> +export KERNELVERSION=$kernel_version_str
> +export CROSS_COMPILE=$cross_prefix
> +export CC=$cross_prefix$cc
> +export LD=$cross_prefix$ld
> +export OBJCOPY=$cross_prefix$objcopy
> +export AR=$cross_prefix$ar
> +export KVM_VERSION=$(kvm_version)
>  EOF
>  
>  cat <<EOF > kvm-kmod-config.h
>  #define KERNEL_EXTRAVERSION $kernel_extraversion
>  $config_fedora_kernel
>  EOF
> 

Thanks, merged. I just dropped the export from those variables that are
kvm-kmod-only.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [Qemu-devel] [PATCH] need to export variables in config.mak
@ 2011-10-03  7:57       ` Jan Kiszka
  0 siblings, 0 replies; 13+ messages in thread
From: Jan Kiszka @ 2011-10-03  7:57 UTC (permalink / raw)
  To: Chris Friesen; +Cc: qemu-devel, kvm, Avi Kivity

[-- Attachment #1: Type: text/plain, Size: 1731 bytes --]

On 2011-09-30 19:40, Chris Friesen wrote:
> The variables being written to config.mak by configure
> need to be exported in order to take effect when building
> the package.
> 
> The following patch fixes this in our environment.
> 
> Signed-off-by: Chris Friesen <chris.friesen@genband.com>
> 
> 
> Index: kvm-kmod-3.0b/configure
> ===================================================================
> --- kvm-kmod-3.0b.orig/configure	2011-09-27 15:12:08.000009000 -0500
> +++ kvm-kmod-3.0b/configure	2011-09-27 15:11:59.001566000 -0500
> @@ -168,24 +168,24 @@ fi
>  rm -f include/asm include-compat/asm
>  mkdir -p include
>  ln -sf asm-"$karch" include/asm
>  ln -sf asm-"$karch" include-compat/asm
>  
>  cat <<EOF > config.mak
> -ARCH=$arch
> -PROCESSOR=$processor
> -PREFIX=$prefix
> -KERNELDIR=$kerneldir
> -KERNELSOURCEDIR=$kernelsourcedir
> -KERNELVERSION=$kernel_version_str
> -CROSS_COMPILE=$cross_prefix
> -CC=$cross_prefix$cc
> -LD=$cross_prefix$ld
> -OBJCOPY=$cross_prefix$objcopy
> -AR=$cross_prefix$ar
> -KVM_VERSION=$(kvm_version)
> +export ARCH=$arch
> +export PROCESSOR=$processor
> +export PREFIX=$prefix
> +export KERNELDIR=$kerneldir
> +export KERNELSOURCEDIR=$kernelsourcedir
> +export KERNELVERSION=$kernel_version_str
> +export CROSS_COMPILE=$cross_prefix
> +export CC=$cross_prefix$cc
> +export LD=$cross_prefix$ld
> +export OBJCOPY=$cross_prefix$objcopy
> +export AR=$cross_prefix$ar
> +export KVM_VERSION=$(kvm_version)
>  EOF
>  
>  cat <<EOF > kvm-kmod-config.h
>  #define KERNEL_EXTRAVERSION $kernel_extraversion
>  $config_fedora_kernel
>  EOF
> 

Thanks, merged. I just dropped the export from those variables that are
kvm-kmod-only.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-10-03  7:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-30 17:07 [BUG] need to export variables in config.mak Chris Friesen
2011-09-30 17:07 ` [Qemu-devel] " Chris Friesen
2011-09-30 17:12 ` Jan Kiszka
2011-09-30 17:12   ` [Qemu-devel] " Jan Kiszka
2011-09-30 17:40   ` [PATCH] " Chris Friesen
2011-09-30 17:40     ` [Qemu-devel] " Chris Friesen
2011-10-03  7:57     ` Jan Kiszka
2011-10-03  7:57       ` [Qemu-devel] " Jan Kiszka
2011-09-30 17:52 ` [Qemu-devel] [BUG] " Richard Henderson
2011-09-30 17:52   ` Richard Henderson
2011-09-30 18:00   ` Alexander Graf
2011-09-30 18:14   ` Chris Friesen
2011-09-30 18:14     ` [Qemu-devel] " Chris Friesen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.