aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Bachmeyer <jcb62281+dev@gmail.com>2020-05-25 08:40:46 -0600
committerRob Savoye <rob@senecass.com>2020-05-25 08:41:16 -0600
commitba60272a5ac6f6a7012acca03f596a6ed003f044 (patch)
treeed84e0a83109891d80382c9f7302270887b59aee
parent93b882b9dfcc4f905ad0041a37f8899c22e9a3f8 (diff)
Establish a default C compiler by evaluating [find_gcc] if no other compiler is given.
-rw-r--r--ChangeLog53
-rw-r--r--baseboards/aarch64-sim.exp2
-rw-r--r--baseboards/am33_2.0-libremote.exp3
-rw-r--r--baseboards/androideabi.exp4
-rw-r--r--baseboards/arm-ice.exp2
-rw-r--r--baseboards/arm-sim.exp2
-rw-r--r--baseboards/cris-sim.exp3
-rw-r--r--baseboards/d30v-sim.exp6
-rw-r--r--baseboards/fr30-sim.exp3
-rw-r--r--baseboards/frv-sim.exp3
-rw-r--r--baseboards/gdbserver-sample.exp4
-rw-r--r--baseboards/iq2000-sim.exp3
-rw-r--r--baseboards/linux-gdbserver.exp5
-rw-r--r--baseboards/linux-libremote.exp5
-rw-r--r--baseboards/mcore-moto-sim.exp3
-rw-r--r--baseboards/mcore-sim.exp3
-rw-r--r--baseboards/mips-sim-idt32.exp5
-rw-r--r--baseboards/mips-sim-idt64.exp5
-rw-r--r--baseboards/mips-sim-mti32.exp5
-rw-r--r--baseboards/mips-sim-mti64.exp5
-rw-r--r--baseboards/mips-sim-mti64_64.exp5
-rw-r--r--baseboards/mips-sim-mti64_n32.exp5
-rw-r--r--baseboards/mips-sim-sde32.exp5
-rw-r--r--baseboards/mips-sim-sde64.exp5
-rw-r--r--baseboards/mips-sim.exp6
-rw-r--r--baseboards/mmixware-sim.exp6
-rw-r--r--baseboards/mn10200-sim.exp6
-rw-r--r--baseboards/mn10300-sim.exp6
-rw-r--r--baseboards/moxie-sim.exp3
-rw-r--r--baseboards/msp430-sim.exp1
-rw-r--r--baseboards/powerpc-sim.exp6
-rw-r--r--baseboards/powerpcle-sim.exp6
-rw-r--r--baseboards/rx-sim.exp3
-rw-r--r--baseboards/sh-sim.exp3
-rw-r--r--baseboards/sparc-sim.exp3
-rw-r--r--baseboards/sparc64-sim.exp3
-rw-r--r--baseboards/sparclite-sim-le.exp3
-rw-r--r--baseboards/sparclite-sim.exp3
-rw-r--r--baseboards/unix.exp4
-rw-r--r--baseboards/v850-sim.exp3
-rw-r--r--baseboards/visium-sim.exp3
-rw-r--r--baseboards/xtensa-sim.exp3
-rw-r--r--doc/dejagnu.texi6
-rw-r--r--lib/target.exp6
44 files changed, 102 insertions, 125 deletions
diff --git a/ChangeLog b/ChangeLog
index fec2c66..093e8be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,56 @@
+2020-05-20 Jacob Bachmeyer <jcb62281+dev@gmail.com>
+
+ * doc/dejagnu.texi (Adding a new board): Document that the
+ "compiler" board_info field is optional and defaults to [find_gcc]
+ if not given.
+ (Board configuration file): Likewise.
+
+ * lib/target.exp (default_target_compile): Establish a default C
+ compiler by evaluating [find_gcc] if no other compiler is given.
+
+ * baseboards/aarch64-sim.exp: Remove no-longer-needed
+ "set_board_info compiler [find_gcc]" from this file.
+ * baseboards/am33_2.0-libremote.exp: Likewise.
+ * baseboards/androideabi.exp: Likewise.
+ * baseboards/arm-ice.exp: Likewise.
+ * baseboards/arm-sim.exp: Likewise.
+ * baseboards/cris-sim.exp: Likewise.
+ * baseboards/d30v-sim.exp: Likewise.
+ * baseboards/fr30-sim.exp: Likewise.
+ * baseboards/frv-sim.exp: Likewise.
+ * baseboards/gdbserver-sample.exp: Likewise.
+ * baseboards/iq2000-sim.exp: Likewise.
+ * baseboards/linux-gdbserver.exp: Likewise.
+ * baseboards/linux-libremote.exp: Likewise.
+ * baseboards/mcore-moto-sim.exp: Likewise.
+ * baseboards/mcore-sim.exp: Likewise.
+ * baseboards/mips-sim-idt32.exp: Likewise.
+ * baseboards/mips-sim-idt64.exp: Likewise.
+ * baseboards/mips-sim-mti32.exp: Likewise.
+ * baseboards/mips-sim-mti64.exp: Likewise.
+ * baseboards/mips-sim-mti64_64.exp: Likewise.
+ * baseboards/mips-sim-mti64_n32.exp: Likewise.
+ * baseboards/mips-sim-sde32.exp: Likewise.
+ * baseboards/mips-sim-sde64.exp: Likewise.
+ * baseboards/mips-sim.exp: Likewise.
+ * baseboards/mmixware-sim.exp: Likewise.
+ * baseboards/mn10200-sim.exp: Likewise.
+ * baseboards/mn10300-sim.exp: Likewise.
+ * baseboards/moxie-sim.exp: Likewise.
+ * baseboards/msp430-sim.exp: Likewise.
+ * baseboards/powerpc-sim.exp: Likewise.
+ * baseboards/powerpcle-sim.exp: Likewise.
+ * baseboards/rx-sim.exp: Likewise.
+ * baseboards/sh-sim.exp: Likewise.
+ * baseboards/sparc-sim.exp: Likewise.
+ * baseboards/sparc64-sim.exp: Likewise.
+ * baseboards/sparclite-sim-le.exp: Likewise.
+ * baseboards/sparclite-sim.exp: Likewise.
+ * baseboards/unix.exp: Likewise.
+ * baseboards/v850-sim.exp: Likewise.
+ * baseboards/visium-sim.exp: Likewise.
+ * baseboards/xtensa-sim.exp: Likewise.
+
2020-05-24 Rob Savoye <rob@senecass.com>
* baseboards/pi.exp: New config file for cross testing to a
diff --git a/baseboards/aarch64-sim.exp b/baseboards/aarch64-sim.exp
index 9680075..cc459d2 100644
--- a/baseboards/aarch64-sim.exp
+++ b/baseboards/aarch64-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
diff --git a/baseboards/am33_2.0-libremote.exp b/baseboards/am33_2.0-libremote.exp
index 442efa4..5df36d4 100644
--- a/baseboards/am33_2.0-libremote.exp
+++ b/baseboards/am33_2.0-libremote.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -24,7 +24,6 @@ load_generic_config "libremote_server"
process_multilib_options ""
# The default compiler for this target.
-#set_board_info compiler "[find_gcc]"
set_board_info compiler "am33_2.0-linux-gnu-gcc"
# We will be using the standard GDB remote protocol
diff --git a/baseboards/androideabi.exp b/baseboards/androideabi.exp
index 2a08bb8..fe610a5 100644
--- a/baseboards/androideabi.exp
+++ b/baseboards/androideabi.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2016 Free Software Foundation, Inc.
+# Copyright (C) 2013-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -23,8 +23,6 @@ load_generic_config "adb"
# We need this for find_gcc and *_include_flags/*_link_flags.
load_base_board_description "adb"
-set_board_info compiler "[find_gcc]"
-
# We may need -mandroid.
set_board_info cflags "-mandroid"
set_board_info ldflags "-mandroid"
diff --git a/baseboards/arm-ice.exp b/baseboards/arm-ice.exp
index 6b698b2..c59cf39 100644
--- a/baseboards/arm-ice.exp
+++ b/baseboards/arm-ice.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
diff --git a/baseboards/arm-sim.exp b/baseboards/arm-sim.exp
index ca8f8c2..342a5db 100644
--- a/baseboards/arm-sim.exp
+++ b/baseboards/arm-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
diff --git a/baseboards/cris-sim.exp b/baseboards/cris-sim.exp
index 713b5cc..f3211c2 100644
--- a/baseboards/cris-sim.exp
+++ b/baseboards/cris-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -77,7 +77,6 @@ if { ![board_info $board exists sim,options] && $cris_simopt ne "" } {
# target. We assume that all multilib options have been specified
# before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] $cris_ldopt"
# No linker script needed.
diff --git a/baseboards/d30v-sim.exp b/baseboards/d30v-sim.exp
index 374679b..87c136f 100644
--- a/baseboards/d30v-sim.exp
+++ b/baseboards/d30v-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,10 +29,6 @@ load_base_board_description "basic-sim"
# The name of the simulator directory is "d30v".
setup_sim d30v
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
-
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
# Pass -C to the assembler to suppress the warning about symbols being the same name as registers
diff --git a/baseboards/fr30-sim.exp b/baseboards/fr30-sim.exp
index 1cc379f..64e1f23 100644
--- a/baseboards/fr30-sim.exp
+++ b/baseboards/fr30-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -35,7 +35,6 @@ process_multilib_options ""
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
# No linker script needed.
diff --git a/baseboards/frv-sim.exp b/baseboards/frv-sim.exp
index cf0797f..f0cab80 100644
--- a/baseboards/frv-sim.exp
+++ b/baseboards/frv-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -35,7 +35,6 @@ process_multilib_options ""
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
# No linker script needed.
diff --git a/baseboards/gdbserver-sample.exp b/baseboards/gdbserver-sample.exp
index 21f59fc..f5740a8 100644
--- a/baseboards/gdbserver-sample.exp
+++ b/baseboards/gdbserver-sample.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -23,8 +23,6 @@ load_generic_config "gdbserver"
process_multilib_options ""
# The default compiler for this target.
-set_board_info compiler "[find_gcc]"
-
#set_board_info compiler "/opt/src/gcc/install-30/bin/gcc"
#set_board_info c++compiler "/opt/src/gcc/install-30/bin/g++"
diff --git a/baseboards/iq2000-sim.exp b/baseboards/iq2000-sim.exp
index 53ff2c0..59228eb 100644
--- a/baseboards/iq2000-sim.exp
+++ b/baseboards/iq2000-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -34,7 +34,6 @@ process_multilib_options ""
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
# Special linker script needed to run C programs.
diff --git a/baseboards/linux-gdbserver.exp b/baseboards/linux-gdbserver.exp
index ef51555..455dc23 100644
--- a/baseboards/linux-gdbserver.exp
+++ b/baseboards/linux-gdbserver.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -22,9 +22,6 @@ load_generic_config "gdbserver"
process_multilib_options ""
-# The default compiler for this target.
-set_board_info compiler "[find_gcc]"
-
# We will be using the standard GDB remote protocol
set_board_info gdb_protocol "remote"
diff --git a/baseboards/linux-libremote.exp b/baseboards/linux-libremote.exp
index 3936c37..6e351e5 100644
--- a/baseboards/linux-libremote.exp
+++ b/baseboards/linux-libremote.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -22,9 +22,6 @@ load_generic_config "gdbserver"
process_multilib_options ""
-# The default compiler for this target.
-set_board_info compiler "[find_gcc]"
-
# We will be using the standard GDB remote protocol
set_board_info gdb_protocol "remote"
diff --git a/baseboards/mcore-moto-sim.exp b/baseboards/mcore-moto-sim.exp
index d9db95a..3405b74 100644
--- a/baseboards/mcore-moto-sim.exp
+++ b/baseboards/mcore-moto-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -33,7 +33,6 @@ process_multilib_options ""
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/mcore-sim.exp b/baseboards/mcore-sim.exp
index e2fbad8..98839ad 100644
--- a/baseboards/mcore-sim.exp
+++ b/baseboards/mcore-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -35,7 +35,6 @@ process_multilib_options ""
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
# No linker script needed.
diff --git a/baseboards/mips-sim-idt32.exp b/baseboards/mips-sim-idt32.exp
index a16529a..ccd6997 100644
--- a/baseboards/mips-sim-idt32.exp
+++ b/baseboards/mips-sim-idt32.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,9 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
#set_board_info needs_status_wrapper 1
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/mips-sim-idt64.exp b/baseboards/mips-sim-idt64.exp
index d85acd1..249bbf1 100644
--- a/baseboards/mips-sim-idt64.exp
+++ b/baseboards/mips-sim-idt64.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,9 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
#set_board_info needs_status_wrapper 1
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/mips-sim-mti32.exp b/baseboards/mips-sim-mti32.exp
index 56f6d2c..e3fa66d 100644
--- a/baseboards/mips-sim-mti32.exp
+++ b/baseboards/mips-sim-mti32.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2016 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,9 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
#set_board_info needs_status_wrapper 1
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/mips-sim-mti64.exp b/baseboards/mips-sim-mti64.exp
index 6d2bfdc..cd4b4d2 100644
--- a/baseboards/mips-sim-mti64.exp
+++ b/baseboards/mips-sim-mti64.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2016 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,9 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
#set_board_info needs_status_wrapper 1
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/mips-sim-mti64_64.exp b/baseboards/mips-sim-mti64_64.exp
index 841aabd..f589b2a 100644
--- a/baseboards/mips-sim-mti64_64.exp
+++ b/baseboards/mips-sim-mti64_64.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2016 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,9 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
#set_board_info needs_status_wrapper 1
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/mips-sim-mti64_n32.exp b/baseboards/mips-sim-mti64_n32.exp
index e622d4b..13bf01f 100644
--- a/baseboards/mips-sim-mti64_n32.exp
+++ b/baseboards/mips-sim-mti64_n32.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2016 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,9 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
#set_board_info needs_status_wrapper 1
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/mips-sim-sde32.exp b/baseboards/mips-sim-sde32.exp
index a25fbd7..e5a9265 100644
--- a/baseboards/mips-sim-sde32.exp
+++ b/baseboards/mips-sim-sde32.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2016 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,9 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
#set_board_info needs_status_wrapper 1
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/mips-sim-sde64.exp b/baseboards/mips-sim-sde64.exp
index 5e17660..0cb7efb 100644
--- a/baseboards/mips-sim-sde64.exp
+++ b/baseboards/mips-sim-sde64.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2012-2016 Free Software Foundation, Inc.
+# Copyright (C) 2012-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,9 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
#set_board_info needs_status_wrapper 1
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/mips-sim.exp b/baseboards/mips-sim.exp
index aea34ce..cf6c93b 100644
--- a/baseboards/mips-sim.exp
+++ b/baseboards/mips-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -29,10 +29,6 @@ setup_sim mips
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
-
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/mmixware-sim.exp b/baseboards/mmixware-sim.exp
index cab363a..e5951fa 100644
--- a/baseboards/mmixware-sim.exp
+++ b/baseboards/mmixware-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -52,10 +52,6 @@ set_board_info is_simulator 1
# can deal with separately.
set_board_info obj_format "elf"
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
-
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
set_board_info cflags "[newlib_include_flags]"
diff --git a/baseboards/mn10200-sim.exp b/baseboards/mn10200-sim.exp
index 773ea1a..77c9d52 100644
--- a/baseboards/mn10200-sim.exp
+++ b/baseboards/mn10200-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -33,10 +33,6 @@ setup_sim mn10200
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
-
# We only support newlib on this target.
set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/mn10300-sim.exp b/baseboards/mn10300-sim.exp
index 875a787..c0bedba 100644
--- a/baseboards/mn10300-sim.exp
+++ b/baseboards/mn10300-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -33,10 +33,6 @@ setup_sim mn10300
# No multilib flags are set by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
-
# We only support newlib on this target.
set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/moxie-sim.exp b/baseboards/moxie-sim.exp
index 858fb3f..dc755f8 100644
--- a/baseboards/moxie-sim.exp
+++ b/baseboards/moxie-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2016 Free Software Foundation, Inc.
+# Copyright (C) 2010-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -34,7 +34,6 @@ process_multilib_options ""
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
# No linker script needed.
diff --git a/baseboards/msp430-sim.exp b/baseboards/msp430-sim.exp
index f43bdff..32be556 100644
--- a/baseboards/msp430-sim.exp
+++ b/baseboards/msp430-sim.exp
@@ -17,7 +17,6 @@ process_multilib_options ""
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags] -msim"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/powerpc-sim.exp b/baseboards/powerpc-sim.exp
index 5d40a67..19b7b93 100644
--- a/baseboards/powerpc-sim.exp
+++ b/baseboards/powerpc-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -32,10 +32,6 @@ setup_sim ppc
# No multilib flags needed by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
-
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "-msim [libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/powerpcle-sim.exp b/baseboards/powerpcle-sim.exp
index bf3cf65..9b9ba32 100644
--- a/baseboards/powerpcle-sim.exp
+++ b/baseboards/powerpcle-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -32,10 +32,6 @@ setup_sim ppc
# No multilib flags needed by default.
process_multilib_options ""
-# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
-set_board_info compiler "[find_gcc]"
-
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "-msim [libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/rx-sim.exp b/baseboards/rx-sim.exp
index fbc0560..9ee44ad 100644
--- a/baseboards/rx-sim.exp
+++ b/baseboards/rx-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009-2016 Free Software Foundation, Inc.
+# Copyright (C) 2009-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -38,7 +38,6 @@ setup_sim rx
process_multilib_options ""
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[newlib_include_flags] -msim"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/sh-sim.exp b/baseboards/sh-sim.exp
index 3a3c959..6e62d1e 100644
--- a/baseboards/sh-sim.exp
+++ b/baseboards/sh-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003-2016 Free Software Foundation, Inc.
+# Copyright (C) 2003-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -35,7 +35,6 @@ process_multilib_options ""
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
# No linker script needed.
diff --git a/baseboards/sparc-sim.exp b/baseboards/sparc-sim.exp
index 8a2d274..95a4ce9 100644
--- a/baseboards/sparc-sim.exp
+++ b/baseboards/sparc-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -33,7 +33,6 @@ setup_sim erc32
# It needs no multilib flags by default.
process_multilib_options ""
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]"
set_board_info ldflags "-nostdlib -nostartfiles [libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/sparc64-sim.exp b/baseboards/sparc64-sim.exp
index b36ff89..f019203 100644
--- a/baseboards/sparc64-sim.exp
+++ b/baseboards/sparc64-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -33,7 +33,6 @@ setup_sim sparc64
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
# No linker script.
diff --git a/baseboards/sparclite-sim-le.exp b/baseboards/sparclite-sim-le.exp
index fee838c..28898e0 100644
--- a/baseboards/sparclite-sim-le.exp
+++ b/baseboards/sparclite-sim-le.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -37,7 +37,6 @@ setup_sim erc32
# It needs no multilib flags by default.
process_multilib_options ""
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]"
set_board_info ldflags "-nostdlib -nostartfiles [libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/sparclite-sim.exp b/baseboards/sparclite-sim.exp
index 81a3253..ffb5ddd 100644
--- a/baseboards/sparclite-sim.exp
+++ b/baseboards/sparclite-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -33,7 +33,6 @@ setup_sim erc32
# It needs no multilib flags by default.
process_multilib_options ""
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[newlib_include_flags] [libgloss_include_flags]"
set_board_info ldflags "-nostdlib -nostartfiles [libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/unix.exp b/baseboards/unix.exp
index d6adbe1..4ffb4b6 100644
--- a/baseboards/unix.exp
+++ b/baseboards/unix.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -21,8 +21,6 @@ load_generic_config "unix"
process_multilib_options ""
-set_board_info compiler "[find_gcc]"
-
set_board_info bmk,use_alarm 1
# Do not use -lm on Cygwin
diff --git a/baseboards/v850-sim.exp b/baseboards/v850-sim.exp
index 4365fa0..db62606 100644
--- a/baseboards/v850-sim.exp
+++ b/baseboards/v850-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -33,7 +33,6 @@ setup_sim v850
# We only support newlib on this target. We assume that all multilib
# options have been specified before we get here.
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
# DDB linker script.
diff --git a/baseboards/visium-sim.exp b/baseboards/visium-sim.exp
index b4e1ed3..de0861c 100644
--- a/baseboards/visium-sim.exp
+++ b/baseboards/visium-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2013-2016 Free Software Foundation, Inc.
+# Copyright (C) 2013-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -32,7 +32,6 @@ setup_sim visium
# No multilib flags needed by default.
process_multilib_options ""
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "-msim [libgloss_link_flags] [newlib_link_flags]"
diff --git a/baseboards/xtensa-sim.exp b/baseboards/xtensa-sim.exp
index 5b8e0d0..210c3be 100644
--- a/baseboards/xtensa-sim.exp
+++ b/baseboards/xtensa-sim.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997-2016 Free Software Foundation, Inc.
+# Copyright (C) 1997-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -32,7 +32,6 @@ set_board_info is_simulator 1
# No default multilib options are needed for this board.
process_multilib_options ""
-set_board_info compiler "[find_gcc]"
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags]"
diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi
index 4247f52..34b11a1 100644
--- a/doc/dejagnu.texi
+++ b/doc/dejagnu.texi
@@ -1424,7 +1424,8 @@ There are five helper procedures used in this example:
@code{find_gcc} looks for a copy of the GNU compiler in your build
tree, or it uses the one in your path. This will also return the
proper transformed name for a cross compiler if you whole build tree
-is configured for one.
+is configured for one. DejaGnu will use this procedure to locate a
+compiler if the @code{compiler} field is not set.
@item
@code{libgloss_include_flags} returns the flags to compile using
@@ -1965,7 +1966,8 @@ load_generic_config "sim"
load_base_board_description "basic-sim"
# The compiler used to build for this board. This has *nothing* to do
-# with what compiler is tested if we're testing gcc.
+# with what compiler is tested if we're testing gcc. Further, this is
+# the default, so this line is optional for most boards.
set_board_info compiler "[find_gcc]"
# We only support newlib on this target.
diff --git a/lib/target.exp b/lib/target.exp
index d6d44fe..37c73c5 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -489,7 +489,11 @@ proc default_target_compile {source destfile type options} {
}
if { $compiler eq "" } {
- set compiler [board_info $dest compiler]
+ if { [board_info $dest exists compiler] } {
+ set compiler [board_info $dest compiler]
+ } elseif { $compiler_type eq "c" } {
+ set compiler [find_gcc]
+ }
if { $compiler eq "" } {
return "default_target_compile: No compiler to compile with"
}