Skip to content

Commit de9f22c

Browse files
committed
Switch _PICOCRT_ENABLE_MMU to __PICOCRT_ENABLE_MMU
Use __ namespace for config options. Signed-off-by: Keith Packard <[email protected]>
1 parent 63b103a commit de9f22c

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ set(__INIT_FINI_ARRAY 1)
143143
set(__INIT_FINI_FUNCS 1)
144144

145145
# Enable MMU in pico crt startup
146-
set(_PICOCRT_ENABLE_MMU 1)
146+
set(__PICOCRT_ENABLE_MMU 1)
147147

148148
# _set_tls and _init_tls functions available
149149
if(NOT DEFINED __THREAD_LOCAL_STORAGE_API OR NOT __THREAD_LOCAL_STORAGE)

meson.build

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,10 +1357,10 @@ conf_data.set('__IO_FLOAT_EXACT', io_float_exact)
13571357
conf_data.set('__IO_PERCENT_B', io_percent_b)
13581358
conf_data.set('__IO_LONG_DOUBLE', io_long_double)
13591359
conf_data.set('__IO_WCHAR', io_wchar)
1360-
conf_data.set('__ASSERT_VERBOSE', get_option('assert-verbose'))
1361-
conf_data.set('__SINGLE_THREAD', get_option('single-thread'))
1362-
conf_data.set('__HAVE_FCNTL', newlib_have_fcntl)
1363-
conf_data.set('__NANO_MALLOC', newlib_nano_malloc)
1360+
conf_data.set('__ASSERT_VERBOSE', get_option('assert-verbose'), description: 'assert() is verbose by default')
1361+
conf_data.set('__SINGLE_THREAD', get_option('single-thread'), description: 'Disable multi-thread support')
1362+
conf_data.set('__HAVE_FCNTL', newlib_have_fcntl, description: 'System provides fcntl function')
1363+
conf_data.set('__NANO_MALLOC', newlib_nano_malloc, description: 'Provide smaller malloc implementation')
13641364
conf_data.set('__NANO_MALLOC_CLEAR_FREED', nano_malloc_clear_freed and newlib_nano_malloc)
13651365
conf_data.set('__IEEE_LIBM', not get_option('want-math-errno'), description: 'math library does not set errno (offering only ieee semantics)')
13661366
conf_data.set('__MATH_ERRNO', get_option('want-math-errno'), description: 'math library sets errno')
@@ -1431,7 +1431,7 @@ else
14311431
endif
14321432

14331433
if enable_picocrt
1434-
conf_data.set('_PICOCRT_ENABLE_MMU', picocrt_enable_mmu,
1434+
conf_data.set('__PICOCRT_ENABLE_MMU', picocrt_enable_mmu,
14351435
description: 'Turn on mmu in picocrt startup code')
14361436
conf_data.set('__PICOLIBC_CRT_RUNTIME_SIZE',
14371437
get_option('crt-runtime-size'),

picocrt/machine/arm/crt0.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ _start(void)
9595

9696
#else /* __ARM_ARCH_PROFILE == 'M' */
9797

98-
#ifdef _PICOCRT_ENABLE_MMU
98+
#ifdef __PICOCRT_ENABLE_MMU
9999

100100
#if __ARM_ARCH >= 7 && __ARM_ARCH_PROFILE != 'R'
101101

@@ -167,7 +167,7 @@ __asm__(
167167
);
168168
#endif
169169

170-
#endif /* _PICOCRT_ENABLE_MMU */
170+
#endif /* __PICOCRT_ENABLE_MMU */
171171

172172
/*
173173
* Set up all of the shadow stack pointers. With Thumb 1 ISA we need
@@ -263,7 +263,7 @@ _cstart(void)
263263
__asm__("mcr p15, #0, %0, c12, c0, 0" : : "r"(__vector_table) :);
264264
#endif
265265

266-
#ifdef _PICOCRT_ENABLE_MMU
266+
#ifdef __PICOCRT_ENABLE_MMU
267267

268268
#if __ARM_ARCH >= 7 && __ARM_ARCH_PROFILE != 'R'
269269

@@ -318,7 +318,7 @@ _cstart(void)
318318
}
319319
#endif
320320

321-
#endif /* _PICOCRT_ENABLE_MMU */
321+
#endif /* __PICOCRT_ENABLE_MMU */
322322

323323
__start();
324324
}

picolibc.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#cmakedefine __PICOLIBC_ERRNO_FUNCTION @__PICOLIBC_ERRNO_FUNCTION@
2222

2323
/* Turn on mmu in picocrt startup code */
24-
#cmakedefine _PICOCRT_ENABLE_MMU
24+
#cmakedefine __PICOCRT_ENABLE_MMU
2525

2626
/* use thread local storage */
2727
#cmakedefine __THREAD_LOCAL_STORAGE

0 commit comments

Comments
 (0)