[libatomic] Add RTEMS support
authorSebastian Huber <sebastian.huber@embedded-brains.de>
Wed, 27 Apr 2016 07:14:42 +0000 (07:14 +0000)
committerSebastian Huber <sh@gcc.gnu.org>
Wed, 27 Apr 2016 07:14:42 +0000 (07:14 +0000)
gcc/

* config/rtems.h (LIB_SPEC): Add -latomic.

libatomic/

* configure.tgt (configure_tgt_pre_target_cpu_XCFLAGS): New variable.
(*-*-rtems*): New supported target.
* config/rtems/host-config.h: New file.
* config/rtems/lock.c: Likewise.

From-SVN: r235466

gcc/ChangeLog
gcc/config/rtems.h
libatomic/ChangeLog
libatomic/configure.tgt

index 75367cbd9ce879057c00474990f0b2ee3e9b8dd4..245c929839edc5fa45036b5235e117d2c5169b40 100644 (file)
@@ -1,3 +1,7 @@
+2016-04-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+       * config/rtems.h (LIB_SPEC): Add -latomic.
+
 2016-04-27  Joel Sherrill  <joel@rtems.org>
 
        * config/microblaze/rtems.h: Redefine LINK_SPEC to avoid
index f13f72fd17c150de3b7b67fce544864c52759291..e005547fd9bf5ab19b7d0f563de7cfac8285d0e4 100644 (file)
@@ -45,6 +45,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define LIB_SPEC "%{!qrtems: " STD_LIB_SPEC "} " \
 "%{!nostdlib: %{qrtems: --start-group \
  -lrtemsbsp -lrtemscpu \
- -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
+ -latomic -lc -lgcc --end-group %{!qnolinkcmds: -T linkcmds%s}}}"
 
 #define TARGET_POSIX_IO
index 7fc60c22085246c88bf670244b921225c480ee52..9f56a1baf2ac6029bb9d2c7f81560e86d4d1aacc 100644 (file)
@@ -1,3 +1,10 @@
+2016-04-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
+
+       * configure.tgt (configure_tgt_pre_target_cpu_XCFLAGS): New variable.
+       (*-*-rtems*): New supported target.
+       * config/rtems/host-config.h: New file.
+       * config/rtems/lock.c: Likewise.
+
 2016-04-25  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR target/70454
index c5470d7ef8c36dc6b77a16fa72c17d286ff4318d..eab2765d7fd2c4a66cece52bb7e005e93029e3ce 100644 (file)
 # Map the target cpu to an ARCH sub-directory.  At the same time,
 # work out any special compilation flags as necessary.
 
+# Give operating systems the opportunity to discard XCFLAGS modifications based
+# on ${target_cpu}.  For example to allow proper use of multilibs.
+configure_tgt_pre_target_cpu_XCFLAGS="${XCFLAGS}"
+
 case "${target_cpu}" in
   alpha*)
        # fenv.c needs this option to generate inexact exceptions.
@@ -128,6 +132,12 @@ case "${target}" in
             ;;
         esac
        ;;
+
+  *-*-rtems*)
+       XCFLAGS="${configure_tgt_pre_target_cpu_XCFLAGS}"
+       config_path="rtems"
+       ;;
+
   *-*-elf*)
        # ??? No target OS.  We could be targeting bare-metal kernel-mode,
        # or user-mode for some custom OS.  If the target supports TAS,