From 0433fc2d7d44eafd61017cd0b6c4cab1fcb16990 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 25 Jan 2021 12:29:05 +0100 Subject: [PATCH] RTEMS: Fix default linker script We have to use ENDFILE_SPEC for the default linker script and not STARTFILE_SPEC, since STARTFILE_SPEC is place before the user provided library search paths. gcc/ * config/rtems.h (STARTFILE_SPEC): Remove qnolinkcmds. (ENDFILE_SPEC): Evaluate qnolinkcmds. --- gcc/config/rtems.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h index e5cba75d345..313988d89e5 100644 --- a/gcc/config/rtems.h +++ b/gcc/config/rtems.h @@ -36,11 +36,11 @@ */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "%{!qrtems:crt0%O%s} " \ -"%{qrtems:" RTEMS_STARTFILE_SPEC " %{!qnolinkcmds:-T linkcmds%s}}" +"%{qrtems:" RTEMS_STARTFILE_SPEC "}" #undef ENDFILE_SPEC #define ENDFILE_SPEC \ -"%{qrtems:" RTEMS_ENDFILE_SPEC "}" +"%{qrtems:" RTEMS_ENDFILE_SPEC " %{!qnolinkcmds:-T linkcmds%s}}" /* * Some targets do not set up LIB_SPECS, override it, here. -- 2.30.2