Skip to contentSkip to conversation

Fix out-of-tree builds

PATCH In review Andrew Jones 3 participants 3 messages May 11, 2020 – Jun 23, 2020 KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix out-of-tree builds

Since b16df9ee5f3b out-of-tree builds have been broken because we started validating the newly user-configurable $erratatxt file before linking it into the build dir. We fix this not by moving the validation, but by removing the linking and instead using the full path of the $erratatxt file. This allows one to keep that file separate from the src and build dirs.

Fixes b16df9ee5f3b ("arch-run: Add reserved variables to the default environ")
---
 configure | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
configure +3 -5
index 5d2cd90cd180..f9d030fd2f03 100755
@@ -17,7 +17,7 @@ environ_default=yes
 u32_long=
 vmm="qemu"
 errata_force=0
-erratatxt="errata.txt"
+erratatxt="$srcdir/errata.txt"
 
 usage() {
     cat <<-EOF
@@ -89,7 +89,8 @@ while [[ "$1" = -* ]]; do
 	    environ_default=no
 	    ;;
 	--erratatxt)
-	    erratatxt="$arg"
+	    erratatxt=
+	    [ "$arg" ] && erratatxt=$(eval realpath "$arg")
 	    ;;
 	--help)
 	    usage
@@ -169,9 +170,6 @@ if test ! -e Makefile; then
 
     echo "linking scripts..."
     ln -sf "$srcdir/scripts"
-
-    echo "linking errata.txt..."
-    ln -sf "$srcdir/errata.txt"
 fi
 
 # link lib/asm for the architecture
Signature · 1 line
2.25.4
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Andrew Jones

Since b16df9ee5f3b out-of-tree builds have been broken because we started validating the newly user-configurable $erratatxt file before linking it into the build dir. We fix this not by moving the validation, but by removing the linking and instead using the full path of the $erratatxt file. This allows one to keep that file separate from the src and build dirs.

Quoted 6 lines
Fixes b16df9ee5f3b ("arch-run: Add reserved variables to the default environ")
---
 configure | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

Thanks, this seems to fix the issue:

https://travis-ci.com/github/huth/kvm-unit-tests/jobs/332339909

Thus:

maintainer
#2 lore raw
In reply to Andrew Jones
Quoted 39 lines · Andrew Jones

Since b16df9ee5f3b out-of-tree builds have been broken because we started validating the newly user-configurable $erratatxt file before linking it into the build dir. We fix this not by moving the validation, but by removing the linking and instead using the full path of the $erratatxt file. This allows one to keep that file separate from the src and build dirs.

Fixes b16df9ee5f3b ("arch-run: Add reserved variables to the default environ")
---
 configure | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
configure +3 -2
index 5d2cd90cd180..f9d030fd2f03 100755
@@ -17,7 +17,7 @@ environ_default=yes
 u32_long=
 vmm="qemu"
 errata_force=0
-erratatxt="errata.txt"
+erratatxt="$srcdir/errata.txt"
 
 usage() {
     cat <<-EOF
@@ -89,7 +89,8 @@ while [[ "$1" = -* ]]; do
 	    environ_default=no
 	    ;;
 	--erratatxt)
-	    erratatxt="$arg"
+	    erratatxt=
+	    [ "$arg" ] && erratatxt=$(eval realpath "$arg")
 	    ;;
 	--help)
 	    usage

configure if test ! -e Makefile; then · line 175

Quoted 9 lines
configure +0 -3
@@ -169,9 +170,6 @@ if test ! -e Makefile; then
 
     echo "linking scripts..."
     ln -sf "$srcdir/scripts"
-
-    echo "linking errata.txt..."
-    ln -sf "$srcdir/errata.txt"
 fi
 
 # link lib/asm for the architecture

Pushed, thanks.

Paolo