mirror of
https://github.com/autc04/Retro68.git
synced 2024-11-26 06:49:33 +00:00
Fix #28: Don't pass Elf2Mac options on PPC. There is life beyond the 68K.
This commit is contained in:
parent
38a2bf10c9
commit
8b5f06cb9b
@ -29,9 +29,11 @@ add_application(Dialog
|
||||
)
|
||||
|
||||
# Enable -ffunction-sections and -gc-sections to make the app as small as possible
|
||||
# also enable --mac-single to build it as a single-segment app (so that this code path doesn't rot)
|
||||
set_target_properties(Dialog
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS -ffunction-sections
|
||||
LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-single"
|
||||
)
|
||||
# On 68K, also enable --mac-single to build it as a single-segment app (so that this code path doesn't rot)
|
||||
set_target_properties(Dialog PROPERTIES COMPILE_OPTIONS -ffunction-sections)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
||||
set_target_properties(Dialog PROPERTIES LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-single")
|
||||
|
||||
else()
|
||||
set_target_properties(Dialog PROPERTIES LINK_FLAGS "-Wl,-gc-sections")
|
||||
endif()
|
||||
|
@ -13,10 +13,12 @@ add_application(HelloWorld
|
||||
|
||||
# make the result as small as possible
|
||||
# by removing unused code (gc-sections)
|
||||
# and by removing macsbug function names
|
||||
# and by removing macsbug function names on 68K
|
||||
# (don't do this when debugging...)
|
||||
set_target_properties(HelloWorld
|
||||
PROPERTIES
|
||||
COMPILE_OPTIONS -ffunction-sections
|
||||
LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-strip-macsbug"
|
||||
)
|
||||
set_target_properties(HelloWorld PROPERTIES COMPILE_OPTIONS -ffunction-sections)
|
||||
if(CMAKE_SYSTEM_NAME MATCHES Retro68)
|
||||
set_target_properties(HelloWorld PROPERTIES LINK_FLAGS "-Wl,-gc-sections -Wl,--mac-strip-macsbug")
|
||||
|
||||
else()
|
||||
set_target_properties(HelloWorld PROPERTIES LINK_FLAGS "-Wl,-gc-sections")
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user