Only emit section directives on ELF platforms.

main
theraven 12 years ago
parent eee9f69ca1
commit 55bbcd8748

@ -277,11 +277,6 @@ if (LIBDISPATCH)
target_link_libraries(objc ${LIBDISPATCH}) target_link_libraries(objc ${LIBDISPATCH})
endif () endif ()
# Enable .type and .section assembly directives on platforms other than OS X
if (NOT APPLE)
add_definitions(-DHAS_SECTION_DIRECTIVE=1)
endif ()
# Make weak symbols work on OS X # Make weak symbols work on OS X
if (APPLE) if (APPLE)
set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS

@ -109,6 +109,6 @@ CDECL(__objc_block_trampoline_end):
CDECL(__objc_block_trampoline_sret): CDECL(__objc_block_trampoline_sret):
CDECL(__objc_block_trampoline_end_sret): CDECL(__objc_block_trampoline_end_sret):
#endif #endif
#if HAS_SECTION_DIRECTIVE #ifdef __ELF__
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif

@ -10,6 +10,6 @@
#else #else
#warning objc_msgSend() not implemented for your architecture #warning objc_msgSend() not implemented for your architecture
#endif #endif
#if HAS_SECTION_DIRECTIVE #ifdef __ELF__
.section .note.GNU-stack,"",%progbits .section .note.GNU-stack,"",%progbits
#endif #endif

Loading…
Cancel
Save