File tree Expand file tree Collapse file tree 6 files changed +9
-10
lines changed Expand file tree Collapse file tree 6 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ merge_libraries(atari8-crt0
11
11
common-zero-bss
12
12
common-exit-return
13
13
)
14
- target_compile_options (atari8-crt0 PRIVATE -fno-lto )
15
14
16
15
add_platform_library (atari8-c
17
16
abort.c
@@ -22,5 +21,5 @@ add_platform_library(atari8-c
22
21
target_include_directories (atari8-c SYSTEM BEFORE PUBLIC . )
23
22
24
23
# abort is preemptively included if LTO is used, which pulls in _exit support
25
- # unneccessarily.
26
- set_property (SOURCE abort.c PROPERTY COMPILE_FLAGS -fno-lto )
24
+ # unneccessarily. It can be called in an interrupt.
25
+ set_property (SOURCE abort.c PROPERTY COMPILE_OPTIONS -fno-lto -fno-static-stack )
Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ merge_libraries(commodore-crt0
12
12
common-zero-bss
13
13
common-exit-return
14
14
)
15
- target_compile_options (commodore-crt0 PRIVATE -fno-lto )
16
15
17
16
add_platform_library (commodore-c
18
17
abort.c
@@ -22,6 +21,6 @@ add_platform_library(commodore-c
22
21
kernal.S
23
22
)
24
23
# abort is preemptively included if LTO is used, which pulls in _exit support
25
- # unneccessarily.
26
- set_property (SOURCE abort.c PROPERTY COMPILE_OPTIONS -fno-lto )
24
+ # unneccessarily. It can also be called in an interrupt.
25
+ set_property (SOURCE abort.c PROPERTY COMPILE_OPTIONS -fno-lto -fno-static-stack )
27
26
target_include_directories (commodore-c SYSTEM BEFORE PUBLIC . )
Original file line number Diff line number Diff line change @@ -5,7 +5,9 @@ int putchar(int c) {
5
5
return c ;
6
6
}
7
7
8
- int puts (const char * s ) {
8
+ // This can be called by abort(), which can be called in a signal and is not
9
+ // included in LTO.
10
+ __attribute((interrupt , no_isr )) int puts (const char * s ) {
9
11
for (; * s ; ++ s )
10
12
__putchar (* s );
11
13
__putchar ('\n' );
Original file line number Diff line number Diff line change @@ -11,4 +11,5 @@ add_platform_library(common-crt
11
11
shift.cc
12
12
)
13
13
# Don't pull in stack pointer init unnecessarily.
14
- set_property (SOURCE divmod-large.cc PROPERTY COMPILE_OPTIONS -fno-lto )
14
+ # This can be called in an interrupt.
15
+ set_property (SOURCE divmod-large.cc PROPERTY COMPILE_OPTIONS -fno-lto -fno-static-stack )
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ merge_libraries(osi-c1p-crt0
13
13
common-zero-bss
14
14
common-exit-loop
15
15
)
16
- target_compile_options (osi-c1p-crt0 PRIVATE -fno-lto )
17
16
18
17
add_platform_library (osi-c1p-c
19
18
abort.c
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ merge_libraries(sim-crt0
13
13
common-exit-custom
14
14
common-init-stack
15
15
)
16
- target_compile_options (sim-crt0 PRIVATE -fno-lto )
17
16
18
17
add_platform_library (sim-c
19
18
assert.c
You can’t perform that action at this time.
0 commit comments