linux-x86.exp: Compile with -I../bfd

Message ID 20200402114557.90669-1-hjl.tools@gmail.com
State New
Headers show
Series
  • linux-x86.exp: Compile with -I../bfd
Related show

Commit Message

Stefan Schulze Frielinghaus via Binutils April 2, 2020, 11:45 a.m.
Compile with -I../bfd to include <bfd_stdint.h> in PR ld/25749 tests.

	* testsuite/ld-elf/linux-x86.exp (check_pr25749a): Compile with
	-I../bfd.
	(check_pr25749b): Likewise.
---
 ld/ChangeLog                      |  6 ++++++
 ld/testsuite/ld-elf/linux-x86.exp | 10 +++++-----
 2 files changed, 11 insertions(+), 5 deletions(-)

-- 
2.25.1

Patch

diff --git a/ld/ChangeLog b/ld/ChangeLog
index 3d66a84893..ec43c89a59 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,9 @@ 
+2020-04-02  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* testsuite/ld-elf/linux-x86.exp (check_pr25749a): Compile with
+	-I../bfd.
+	(check_pr25749b): Likewise.
+
 2020-04-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
 	* testsuite/ld-ifunc/ifunc-10-i386.d: Remove *-*-solaris2* from
diff --git a/ld/testsuite/ld-elf/linux-x86.exp b/ld/testsuite/ld-elf/linux-x86.exp
index 7186dede71..180674deac 100644
--- a/ld/testsuite/ld-elf/linux-x86.exp
+++ b/ld/testsuite/ld-elf/linux-x86.exp
@@ -148,7 +148,7 @@  proc check_pr25749a {testname srcfilea srcfileb cflags ldflags lderror} {
 	    [list \
 		"Build $testname ($ldflags $cflags)" \
 		"$ldflags tmpdir/pr25749-bin.o" \
-		"$cflags" \
+		"$cflags -I../bfd" \
 		[list $srcfilea $srcfileb]\
 		{{readelf {-Wr} pr25749.rd}}  \
 		"${testname}a" \
@@ -162,7 +162,7 @@  proc check_pr25749a {testname srcfilea srcfileb cflags ldflags lderror} {
 		[list $srcfilea $srcfileb]\
 		"${testname}a" \
 		"pass.out" \
-		"$cflags" \
+		"$cflags -I../bfd" \
 	    ] \
 	]
     } else {
@@ -170,7 +170,7 @@  proc check_pr25749a {testname srcfilea srcfileb cflags ldflags lderror} {
 	    [list \
 		"Build $testname ($ldflags $cflags)" \
 		"$ldflags tmpdir/pr25749-bin.o" \
-		"$cflags" \
+		"$cflags -I../bfd" \
 		[list $srcfilea $srcfileb]\
 		[list [list error_output $lderror]] \
 		"$testname" \
@@ -250,7 +250,7 @@  proc check_pr25749b {testname srcfilea srcfileb cflags ldflags dsoldflags} {
 	[list \
 	    "Build lib${testname}.so ($dsoldflags)" \
 	    "-shared $dsoldflags tmpdir/pr25749-bin.o" \
-	    "-fPIC" \
+	    "-fPIC -I../bfd" \
 	    [list $srcfileb] \
 	    {{readelf {-Wr} pr25749.rd}}  \
 	    "lib${testname}.so" \
@@ -264,7 +264,7 @@  proc check_pr25749b {testname srcfilea srcfileb cflags ldflags dsoldflags} {
 	    [list $srcfilea]\
 	    "${testname}b" \
 	    "pass.out" \
-	    "$cflags" \
+	    "$cflags -I../bfd" \
 	] \
     ]
 }