From: Sebastian Huber Date: Mon, 25 Jan 2021 11:29:05 +0000 (+0100) Subject: RTEMS: Fix default linker script X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0433fc2d7d44eafd61017cd0b6c4cab1fcb16990;p=gcc.git 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. --- 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.