Skip to content
Snippets Groups Projects
Commit 91d930c5 authored by Joakim Nohlgård's avatar Joakim Nohlgård Committed by Neil Jones
Browse files

cpu/mips32r2_common: ifdef __attribute__((optimize))

Causes compilation error on Clang
parent b59a9cb6
No related branches found
No related tags found
No related merge requests found
...@@ -165,7 +165,11 @@ struct linkctx* exctx_find(reg_t id, struct gpctx *gp) ...@@ -165,7 +165,11 @@ struct linkctx* exctx_find(reg_t id, struct gpctx *gp)
} }
/* unaligned access helper */ /* unaligned access helper */
static inline uint32_t __attribute__((optimize("-O3"))) static inline uint32_t
#ifndef __clang__
/* Clang does not support attribute optimize */
__attribute__((optimize("-O3")))
#endif
mem_rw(const void *vaddr) mem_rw(const void *vaddr)
{ {
uint32_t v; uint32_t v;
......
...@@ -23,6 +23,10 @@ comma := , ...@@ -23,6 +23,10 @@ comma := ,
# If symbol has a value, produce a linker argument for that symbol. # If symbol has a value, produce a linker argument for that symbol.
MIPS_HAL_LDFLAGS = $(foreach a,$(priv_symbols),$(if $($a),-Wl$(comma)--defsym$(comma)__$(call lc,$(a))=$($a))) MIPS_HAL_LDFLAGS = $(foreach a,$(priv_symbols),$(if $($a),-Wl$(comma)--defsym$(comma)__$(call lc,$(a))=$($a)))
ifeq ($(ROMABLE),1)
MIPS_HAL_LDFLAGS += -T bootcode.ld
endif
# define build specific options # define build specific options
# Remove -std=gnu99 once the MIPS toolchain headers are updated to include upstream # Remove -std=gnu99 once the MIPS toolchain headers are updated to include upstream
# newlib commit 81c17949f0419d1c4fee421c60987ea1149522ae # newlib commit 81c17949f0419d1c4fee421c60987ea1149522ae
......
...@@ -15,10 +15,8 @@ ...@@ -15,10 +15,8 @@
* @see http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html * @see http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fcntl.h.html
*/ */
/** @todo Remove ifdef __mips__ special case after
* [#6639](https://github.com/RIOT-OS/RIOT/pull/6639) is merged */
#ifndef DOXYGEN #ifndef DOXYGEN
#if defined(CPU_NATIVE) || MODULE_NEWLIB || defined(__mips__) #if defined(CPU_NATIVE) || MODULE_NEWLIB
/* If building on native or newlib we need to use the system header instead */ /* If building on native or newlib we need to use the system header instead */
#pragma GCC system_header #pragma GCC system_header
/* without the GCC pragma above #include_next will trigger a pedantic error */ /* without the GCC pragma above #include_next will trigger a pedantic error */
......
...@@ -22,9 +22,7 @@ ...@@ -22,9 +22,7 @@
#define SYS_STATVFS_H #define SYS_STATVFS_H
#include <sys/types.h> /* for fsblkcnt_t, fsfilcnt_t */ #include <sys/types.h> /* for fsblkcnt_t, fsfilcnt_t */
/** @todo Remove ifdef __mips__ special case after #if MODULE_NEWLIB
* [#6639](https://github.com/RIOT-OS/RIOT/pull/6639) is merged */
#if MODULE_NEWLIB || defined(__mips__)
/* newlib support for fsblkcnt_t was only recently added to the newlib git /* newlib support for fsblkcnt_t was only recently added to the newlib git
* repository, commit f3e587d30a9f65d0c6551ad14095300f6e81672e, 15 apr 2016. * repository, commit f3e587d30a9f65d0c6551ad14095300f6e81672e, 15 apr 2016.
* Will be included in release 2.5.0, around new year 2016/2017. * Will be included in release 2.5.0, around new year 2016/2017.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment