dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH 2/2: Use GCC as default compiler


From: Jacob Bachmeyer
Subject: PATCH 2/2: Use GCC as default compiler
Date: Wed, 22 May 2019 21:06:04 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0

This is the patch I suggested earlier. It both simplifies board configuration files and the testing harness needed for default_target_compile.

----
ChangeLog entry:
        * 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.
---
baseboards/aarch64-sim.exp        |    6 +-----
baseboards/am33_2.0-libremote.exp |    3 +--
baseboards/androideabi.exp        |    4 +---
baseboards/arm-ice.exp            |    6 ++----
baseboards/arm-sim.exp            |    6 +-----
baseboards/cris-sim.exp           |    3 +--
baseboards/d30v-sim.exp           |    6 +-----
baseboards/fr30-sim.exp           |    3 +--
baseboards/frv-sim.exp            |    3 +--
baseboards/gdbserver-sample.exp   |    4 +---
baseboards/iq2000-sim.exp         |    3 +--
baseboards/linux-gdbserver.exp    |    5 +----
baseboards/linux-libremote.exp    |    5 +----
baseboards/mcore-moto-sim.exp     |    3 +--
baseboards/mcore-sim.exp          |    3 +--
baseboards/mips-sim-idt32.exp     |    5 +----
baseboards/mips-sim-idt64.exp     |    5 +----
baseboards/mips-sim-mti32.exp     |    5 +----
baseboards/mips-sim-mti64.exp     |    5 +----
baseboards/mips-sim-mti64_64.exp  |    5 +----
baseboards/mips-sim-mti64_n32.exp |    5 +----
baseboards/mips-sim-sde32.exp     |    5 +----
baseboards/mips-sim-sde64.exp     |    5 +----
baseboards/mips-sim.exp           |    6 +-----
baseboards/mmixware-sim.exp       |    6 +-----
baseboards/mn10200-sim.exp        |    6 +-----
baseboards/mn10300-sim.exp        |    6 +-----
baseboards/moxie-sim.exp          |    3 +--
baseboards/msp430-sim.exp         |    1 -
baseboards/powerpc-sim.exp        |    6 +-----
baseboards/powerpcle-sim.exp      |    6 +-----
baseboards/rx-sim.exp             |    3 +--
baseboards/sh-sim.exp             |    3 +--
baseboards/sparc-sim.exp          |    3 +--
baseboards/sparc64-sim.exp        |    3 +--
baseboards/sparclite-sim-le.exp   |    3 +--
baseboards/sparclite-sim.exp      |    3 +--
baseboards/unix.exp               |    4 +---
baseboards/v850-sim.exp           |    3 +--
baseboards/visium-sim.exp         |    3 +--
baseboards/xtensa-sim.exp         |    3 +--
doc/dejagnu.texi                  |    6 ++++--
lib/target.exp                    |    8 ++++++--
43 files changed, 51 insertions(+), 137 deletions(-)

diff --git a/baseboards/aarch64-sim.exp b/baseboards/aarch64-sim.exp
index 8af677c..28258b0 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.
#
@@ -29,10 +29,6 @@ load_base_board_description "basic-sim"
# The name of the directory in the build tree where the simulator lives.
setup_sim aarch64

-# 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]"
-
# The basic set of flags needed to build "hello world" for this
# board. This board uses libgloss and newlib.
set_board_info cflags   "[libgloss_include_flags] [newlib_include_flags]"
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 dd5f3ea..c9c37ca 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.
#
@@ -30,9 +30,7 @@ if { [board_info $board obj_format] eq "pe" } {
}

# basic-sim.exp is a basic description for the standard Cygnus simulator.
-# 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]"
+
# The basic set of flags needed to build "hello world" for this
# board. This board uses libgloss and newlib.
set_board_info cflags   "[libgloss_include_flags] [newlib_include_flags]"
diff --git a/baseboards/arm-sim.exp b/baseboards/arm-sim.exp
index ca0d759..bab1709 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.
#
@@ -41,10 +41,6 @@ load_base_board_description "basic-sim"
# The name of the directory in the build tree where the simulator lives.
setup_sim arm

-# 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]"
-
# The basic set of flags needed to build "hello world" for this
# board. This board uses libgloss and newlib.
set_board_info cflags   "[libgloss_include_flags] [newlib_include_flags]"
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 7664008..68fcfb7 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 c69bcd6..c8aa0cd 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 bf1892a..2b80afe 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 92383b2..ccccb91 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 9cc262d..a9ac83e 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2016 Free Software Foundation, Inc.
+# Copyright (C) 1992-2016, 2019 Free Software Foundation, Inc.
#
# This file is part of DejaGnu.
#
@@ -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"
        }
----


-- Jacob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]