public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r10-9299] RTEMS: Fix GCC specification
@ 2021-01-25 15:42 Sebastian Huber
0 siblings, 0 replies; only message in thread
From: Sebastian Huber @ 2021-01-25 15:42 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:9fe1c085f0af6e6c05a6813eeae44136ea8ce566
commit r10-9299-g9fe1c085f0af6e6c05a6813eeae44136ea8ce566
Author: Sebastian Huber <sebastian.huber@embedded-brains.de>
Date: Fri Jan 22 12:45:49 2021 +0100
RTEMS: Fix GCC specification
The use of -nostdlib and -nodefaultlibs disables the processing of
LIB_SPEC (%L) as specified by LINK_COMMAND_SPEC and thus disables the
default linker script for RTEMS. Move the linker script to
STARTFILE_SPEC which is controlled by -nostdlib and -nostartfiles. This
fits better since the linker script defines the platform start file
provided by the board support package in RTEMS.
gcc/
* config/rtems.h (STARTFILE_SPEC): Remove nostdlib and
nostartfiles handling since this is already done by
LINK_COMMAND_SPEC. Evaluate qnolinkcmds.
(ENDFILE_SPEC): Remove nostdlib and nostartfiles handling since this
is already done by LINK_COMMAND_SPEC.
(LIB_SPECS): Remove nostdlib and nodefaultlibs handling since
this is already done by LINK_COMMAND_SPEC. Remove qnolinkcmds
evaluation.
(cherry picked from commit 28229916e1b131ad5d17a73603f65229e0a92f58)
Diff:
---
gcc/config/rtems.h | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/gcc/config/rtems.h b/gcc/config/rtems.h
index 30ad6258949..7d1a23fb54d 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:%{!nostdlib:%{!nostartfiles:" RTEMS_STARTFILE_SPEC "}}}"
+"%{qrtems:" RTEMS_STARTFILE_SPEC " %{!qnolinkcmds:-T linkcmds%s}}"
#undef ENDFILE_SPEC
#define ENDFILE_SPEC \
-"%{qrtems:%{!nostdlib:%{!nostartfiles:" RTEMS_ENDFILE_SPEC "}}}"
+"%{qrtems:" RTEMS_ENDFILE_SPEC "}"
/*
* Some targets do not set up LIB_SPECS, override it, here.
@@ -49,9 +49,7 @@
#undef LIB_SPEC
#define LIB_SPEC "%{!qrtems:" STD_LIB_SPEC "} " \
-"%{qrtems:%{!nostdlib:%{!nodefaultlibs:" \
-"--start-group -lrtemsbsp -lrtemscpu -latomic -lc -lgcc --end-group} " \
-"%{!qnolinkcmds:-T linkcmds%s}}}"
+"%{qrtems:--start-group -lrtemsbsp -lrtemscpu -latomic -lc -lgcc --end-group}"
#define TARGET_POSIX_IO
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-01-25 15:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25 15:42 [gcc r10-9299] RTEMS: Fix GCC specification Sebastian Huber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).