Skip to contentSkip to conversation

test-meson-builds: allow building outside source dir

PATCH Applied Bruce Richardson 3 participants 3 messages Apr 1, 2019 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 test-meson-builds: allow building outside source dir

The test-meson-builds.sh script correctly detects the source directory and builds the native builds successfully in a directory outside of the source tree. However, the paths to the cross-files are not prefixed with the source directory path, so the cross-builds all fail. Fix this by prepending the source directory path appropriately.

---
 devtools/test-meson-builds.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
devtools/test-meson-builds.sh +2 -2
index e3f19a01a..b3b5cfbb5 100755
@@ -69,9 +69,9 @@ if command -v $c >/dev/null 2>&1 ; then
 	# compile the general v8a also for clang to increase coverage
 	export CC="ccache clang"
 	build build-arm64-host-clang $use_shared \
-		--cross-file config/arm/arm64_armv8_linux_gcc
+		--cross-file $srcdir/config/arm/arm64_armv8_linux_gcc
 
-	for f in config/arm/arm*gcc ; do
+	for f in $srcdir/config/arm/arm*gcc ; do
 		export CC="ccache gcc"
 		build build-$(basename $f | tr '_' '-' | cut -d'-' -f-2) \
 			$use_shared --cross-file $f
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 33 lines · Bruce Richardson

The test-meson-builds.sh script correctly detects the source directory and
builds the native builds successfully in a directory outside of the source
tree. However, the paths to the cross-files are not prefixed with the source directory path, so the cross-builds all fail. Fix this by prepending
the source directory path appropriately.

Signed-off-by: Bruce Richardson <
[email protected]

Quoted 1 line
---
 devtools/test-meson-builds.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
devtools/test-meson- renamed from devtools/test-meson-builds.sh +0 -0

builds.sh
index e3f19a01a..b3b5cfbb5 100755

devtools/test-meson-builds.sh +2 -2
@@ -69,9 +69,9 @@ if command -v $c >/dev/null 2>&1 ; then
 	# compile the general v8a also for clang to increase coverage
 	export CC="ccache clang"
 	build build-arm64-host-clang $use_shared \
-		--cross-file config/arm/arm64_armv8_linux_gcc
+		--cross-file $srcdir/config/arm/arm64_armv8_linux_gcc
 
-	for f in config/arm/arm*gcc ; do
+	for f in $srcdir/config/arm/arm*gcc ; do
 		export CC="ccache gcc"
 		build build-$(basename $f | tr '_' '-' | cut -d'-' -f-
 2) \
Quoted 2 lines

$use_shared --cross-file $f

Signature · 2 lines
Kind regards,
Luca Boccassi
#2 lore raw

01/04/2019 18:23, Luca Boccassi:

Quoted 10 lines · Bruce Richardson
Quoted 9 lines

The test-meson-builds.sh script correctly detects the source directory and
builds the native builds successfully in a directory outside of the source
tree. However, the paths to the cross-files are not prefixed with the source directory path, so the cross-builds all fail. Fix this by prepending
the source directory path appropriately.

Quoted 4 lines
Quoted 2 lines

Signed-off-by: Bruce Richardson <
[email protected]

Applied, thanks