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.
This commit is contained in:
Sebastian Huber 2021-01-25 12:29:05 +01:00
parent 5d01fc7c11
commit 0433fc2d7d

View file

@ -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.