-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support of cross-compilation for linux-based targets. #206
Conversation
mkdir -p ${LOGS_PATH_PARSE_ONLY} | ||
mkdir -p ${LOGS_PATH_FULL} | ||
|
||
RAND=`strings /dev/urandom | grep -o '[[:alnum:]]' | head -n 5 | tr -d '\n'; echo` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, it is better to use mktemp
utility for generation of a directory with random name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
4fc8161
to
e0f8c72
Compare
const opcode_t opcode = getop_meta (OPCODE_META_TYPE_CALL_SITE_INFO, | ||
flags, | ||
(flags & OPCODE_CALL_FLAGS_HAVE_THIS_ARG) ? this_arg.data.uid : INVALID_VALUE); | ||
const opcode_t opcode = getop_meta(OPCODE_META_TYPE_CALL_SITE_INFO, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is not related to the PR, but required for cross building. I'll push this change as a separate commit.
e456ab5
to
d8a9c3e
Compare
@ruben-ayrapetyan gcc version 4.7.4 (Ubuntu/Linaro 4.7.4-2ubuntu1) |
@ruben-ayrapetyan |
@egavrin, looks good. |
d8a9c3e
to
74c56b1
Compare
Folks, I've updated the PR, please check. |
74c56b1
to
9b7ece4
Compare
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
OUT_DIR=$1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, it is better to wrap variables into quotes, like "$1". In the case, space wouldn't divide variable's value and special characters in path would not be replaced.
http://www.tldp.org/LDP/abs/html/quotingvar.html
"When referencing a variable, it is generally advisable to enclose its name in double quotes. This prevents reinterpretation of all special characters within the quoted string -- except $, ` (backquote), and \ (escape)."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, it should be wrapped, but other our scripts doesn't follow this style. I may fix it within this PR, but we should fix this in other scripts too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
9b7ece4
to
b9b1704
Compare
I'll rise a separate pull request to fix other issues in scripts, likewise. |
PR was updated. |
5ecc00a
to
8dc8678
Compare
@@ -17,7 +17,6 @@ set(CMAKE_SYSTEM_PROCESSOR x86_64) | |||
|
|||
find_program(CMAKE_C_COMPILER NAMES x86_64-linux-gnu-gcc x86_64-unknown-linux-gnu-gcc) | |||
find_program(CMAKE_CXX_COMPILER NAMES x86_64-linux-gnu-g++ x86_64-unknown-linux-gnu-g++) | |||
# FIXME: This could break cross compilation, when the strip is not for the target architecture | |||
find_program(CMAKE_STRIP NAMES x86_64-linux-gnu-strip x86_64-unknown-linux-gnu-strip strip) | |||
find_program(CMAKE_STRIP NAMES x86_64-linux-gnu-strip x86_64-unknown-linux-gnu-strip) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did the strip
at the end made the x86_64 cross compilation to cause any problems?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@galpeter no, not really. I may add it back.
I think we can add native toolchain configuration with a separate PR, like Add toolchain_native.cmake
.
8dc8678
to
6a1b90e
Compare
@galpeter PR was updated, I restored |
f855b19
to
00e00df
Compare
[ $RESULT_OK -eq 1 ] || exit 1 | ||
|
||
echo -e "Full testing completed successfully\n\n================\n\n" | ||
./tools/precommit-full-testing.sh ${OUT_DIR} ${TARGETS} || exit 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this pass the ${TARGETS}
as the 2nd, 3rd and etc args? For example if the TARGETS
are: debug.linux release.linux. the command will look like this:
./tools/precommit-full-testing.sh ${OUT_DIR} debug.linux release.linux
Maybe we need to enclose the arguments into quotes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
00e00df
to
6267696
Compare
seems good to me. |
Great! Thank you! |
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin [email protected]
Usage: - Cross compile: make debug.linux TOOLCHAIN=./build/configs/toolchain_linux_armv7l-el.cmake - Build unittests make unittests TOOLCHAIN=./build/configs/toolchain_linux_armv7l-el.cmake - Run unittests on target board ./tools/runners/run-unittests-remote.sh <ip> <login> <pass> - Run JavaScript test on target board ./tools/runners/run-tests-remote.sh debug.linux <ip> <login> <pass> JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin [email protected]
6267696
to
444bd32
Compare
Usage:
make debug.linux TOOLCHAIN=./build/configs/toolchain_linux_armv7l-el.cmake
make unittests TOOLCHAIN=./build/configs/toolchain_linux_armv7l-el.cmake
./tools/runners/run-unittests-remote.sh
./tools/runners/run-tests-remote.sh debug.linux
JerryScript-DCO-1.0-Signed-off-by: Evgeny Gavrin [email protected]