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
6 changes: 5 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ AC_ARG_ENABLE(python2,
esac],[python2=true])
AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
AM_CONDITIONAL(PYTHON2, test x$python2 = xtrue)
AM_CONDITIONAL(ARCH64, test `getconf LONG_BIT` = "64")
if test x$CONFIGURED_ARCH = xarmhf && test x$CROSS_BUILD_ENVIRON = xy; then
Copy link
Copy Markdown
Contributor

@qiluo-msft qiluo-msft Jul 14, 2021

Choose a reason for hiding this comment

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

x$CONFIGURED_ARCH

Is it possible to generalize this rule?
The two varaibles are host arch and target arch. I believe you can get word size from them. #WontFix

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

x$CONFIGURED_ARCH

Is it possible to generalize this rule?
The two varaibles are host arch and target arch. I believe you can get word size from them.

Usually you use "getconf LONG_BIT" linux command in the building environment to figure out whether the target architecture is 64 bit. However when you are using cross-compilation inside native amd64 slave image running "getconf LONG_BIT" will return info about host rather than target. The only way I see is to check directly the target architecture and whether the building environment is cross-compilation. Please suggest your solution if this is not good enough.

AM_CONDITIONAL(ARCH64, false)
else
AM_CONDITIONAL(ARCH64, test `getconf LONG_BIT` = "64")
fi

AC_PATH_PROGS(SWIG, [swig4.0 swig3.0 swig])

Expand Down