b/gdb/testsuite/gdb.base/pie-execl.exp
@@ -37,8 +37,8 @@ set binfile2_test_msg OBJDIR/${subdir}/${executable2}
# file name of the breakpoint.
set opts [list debug additional_flags=-fPIE ldflags=-pie]
-if {[build_executable ${testfile}.exp $executable1 $srcfile [concat $opts
{additional_flags=-DBIN=1}]] == ""
- || [build_executable ${testfile}.exp $executable2 $srcfile [concat
$opts {additional_flags=-DBIN=2}]] == ""} {
+if {[build_executable ${testfile}.exp $executable1 $srcfile [concat $opts
{additional_flags=-DBIN=1}]] == -1
+ || [build_executable ${testfile}.exp $executable2 $srcfile [concat