UBUNTU: [Packaging] ignore warnings from the output of ld.bfd

When generating the script BUILD (or CLEAN) we are taking all the ld.bfd
commands fromt he build log, however if the log contains warnings or
NOTEs such as:

  /usr/bin/ld.bfd: warning: nvidia.o: requires executable stack (because the .note.GNU-stack section is executable)

we would add also that to the script, causing syntax error failures.

Make sure to exclude all warnings to prevent problems like this.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
This commit is contained in:
Andrea Righi
2022-07-04 16:10:40 +02:00
committed by Paolo Pisati
parent 25546aba78
commit 611ce131d1
+1 -1
View File
@@ -53,7 +53,7 @@ cat - <<'EOL' >"$pkgdir/bits/BUILD"
[ "$1" = "unsigned" ] && { signed_only=:; shift; }
[ "$1" = "nocheck" ] && { check_only=:; shift; }
EOL
grep /usr/bin/ld.bfd "$log" | grep -v scripts/genksyms/genksyms | sed -e "s@$build/@@g" >>"$pkgdir/bits/BUILD"
grep /usr/bin/ld.bfd "$log" | grep -v scripts/genksyms/genksyms | grep -v "warning:\|NOTE:" | sed -e "s@$build/@@g" >>"$pkgdir/bits/BUILD"
sed -e 's/.*-o *\([^ ]*\) .*/rm -f \1/g' <"$pkgdir/bits/BUILD" >"$pkgdir/bits/CLEAN"
# As the builds contain the absolute filenames as used. Use RECONSTRUCT to