Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6a7db34

Browse files
committed
revert changes to when -nostartfiles is specified in link for 1.5.1 as it can cause link errors with C++; see#1368
1 parent8ecc5ab commit6a7db34

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

‎src/rp2_common/pico_standard_link/CMakeLists.txt‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,9 @@ if (NOT TARGET pico_standard_link)
7474
target_compile_definitions(pico_standard_linkINTERFACE PICO_DEOPTIMIZED_DEBUG=1)
7575
endif()
7676

77-
# -nostartfiles will be added if not using C++ exceptions (which is the only thing that seems to need it)
78-
if (PICO_C_COMPILER_IS_GNUANDNOT PICO_CXX_ENABLE_EXCEPTIONS)
79-
# target_link_options(pico_standard_link INTERFACE $<$<IF:$<STREQUAL:$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>,no_flash>,1,$<AND:$<BOOL:${PICO_NO_FLASH}>,$<STREQUAL:,$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>>>>:-nostartfiles>)
80-
target_link_options(pico_standard_linkINTERFACE -nostartfiles)
81-
endif()
77+
# this (arguably wrong) code is restored for 1.5.1 as setting -nostartfiles on many C++ binaries causes link errors. see issue #1368
78+
# -nostartfiles will be added if PICO_NO_FLASH would be defined to 1
79+
target_link_options(pico_standard_linkINTERFACE $<$<IF:$<STREQUAL:$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>,no_flash>,1,$<AND:$<BOOL:${PICO_NO_FLASH}>,$<STREQUAL:,$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>>>>:-nostartfiles>)
8280
# boot_stage2 will be linked if PICO_NO_FLASH would be defined to 0
8381
target_link_libraries(pico_standard_linkINTERFACE $<$<NOT:$<IF:$<STREQUAL:$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>,no_flash>,1,$<AND:$<BOOL:${PICO_NO_FLASH}>,$<STREQUAL:,$<TARGET_PROPERTY:PICO_TARGET_BINARY_TYPE>>>>>:$<IF:$<BOOL:$<TARGET_PROPERTY:PICO_TARGET_BOOT_STAGE2>>,$<TARGET_PROPERTY:PICO_TARGET_BOOT_STAGE2>,bs2_default>_library>)
8482

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp