Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,10 @@ if(EXPERIMENTAL)
endif()

# Add arch-dependant flags
if(NOT DEFINED TARGET_ARCH)
message(WARNING "Use generic flags since TARGET_ARCH is not defined")
set(TARGET_ARCH "noarch")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are adding a TARGET_ARCH to be defined as "noarch" if it is not defined then the last else in the following check will never trigger. Is it not possible to set this via debian rules?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well I used to overide in debian/rules but I thought it would be better to have it set default upstream to avoid relying on undefined values,
I could remove the else warning since it's added in my patch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh wait. I misunderstood the if-s here. The change is ok. If the user specified an incorrect arch then a warning will be printed out bellow, but if there is no arch configured then this will be triggered.

if("${TARGET_ARCH}" STREQUAL "arm")
iotjs_add_compile_flags(-D__arm__ -mthumb -fno-short-enums -mlittle-endian)
elseif("${TARGET_ARCH}" STREQUAL "i686")
Expand Down