Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Rev 24 | Rev 26 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 24 Rev 25
Line 68... Line 68...
68
                "       cd ${QNXSDK_PATH}" \
68
                "       cd ${QNXSDK_PATH}" \
69
                "       host\\win64\\x86_64\\usr\\bin\\busybox.exe sh -c \"find . -name symlinks.lst -exec ./symlinks.sh {} create \\; && printf 'present' > .symlinks-state\"" \
69
                "       host\\win64\\x86_64\\usr\\bin\\busybox.exe sh -c \"find . -name symlinks.lst -exec ./symlinks.sh {} create \\; && printf 'present' > .symlinks-state\"" \
70
                "Note that this step WILL take time on a Win32 machine, but is only done once."
70
                "Note that this step WILL take time on a Win32 machine, but is only done once."
71
fi
71
fi
72
 
72
 
-
 
73
# are we running the Windows Subsystem for Linux, instead of a real Linux ?
-
 
74
if [ -n "${WSL_DISTRO_NAME}" ]; then
-
 
75
        # yes. In order to avoid the horrible 9p protocol for file interchange between NTFS and ext4 (a remarkably bad idea by Microsoft),
-
 
76
        # have a copy of $QNX_HOST and $QNX_TARGET in the WSL2 filesystem. The speed gain is considerable.
-
 
77
        if [ ! -d "/tmp/qnxsdk/${QNXSDK_HOSTPATH}" ]; then
-
 
78
                mkdir -p "$(dirname "/tmp/qnxsdk/${QNXSDK_HOSTPATH}")" 2>/dev/null
-
 
79
                echo "Deploying QNX ${QNXSDK_VERSION} HOST SDK to WSL2 ext4 filesystem, please wait..."
-
 
80
                echo "This operation *WILL* take time, but is only done once - as long as your WSL filesystem is preserved."
-
 
81
                cp -R "${CURRENT_DIR}/${QNXSDK_PATH}/${QNXSDK_HOSTPATH}" "$(dirname "/tmp/qnxsdk/${QNXSDK_HOSTPATH}")" || exit 1
-
 
82
        fi
-
 
83
        if [ ! -d "/tmp/qnxsdk/${QNXSDK_TARGETPATH}" ]; then
-
 
84
                mkdir -p "$(dirname "/tmp/qnxsdk/${QNXSDK_TARGETPATH}")" 2>/dev/null
-
 
85
                echo "Deploying QNX ${QNXSDK_VERSION} TARGET SDK to WSL2 ext4 filesystem, please wait..."
-
 
86
                echo "This operation *WILL* take time, but is only done once - as long as your WSL filesystem is preserved."
-
 
87
                cp -R "${CURRENT_DIR}/${QNXSDK_PATH}/${QNXSDK_TARGETPATH}" "$(dirname "/tmp/qnxsdk/${QNXSDK_TARGETPATH}")" || exit 1
-
 
88
        fi
-
 
89
else
73
# create a symlink in /tmp that will lead to the QNX platform SDK so as to avoid spaces in paths if it doesn't exist already
90
        # we're not in WSL. Create a symlink in /tmp that will lead to the QNX platform SDK so as to avoid spaces in paths if it doesn't exist already
74
# (this is totally prohibitive with the official QNX toolchain)
91
        # (this is totally prohibitive with the official QNX toolchain)
75
if [ ! -L /tmp/qnxsdk ] || [ ! "$(readlink /tmp/qnxsdk)" = "$(realpath "${CURRENT_DIR}/${QNXSDK_PATH}")" ]; then
92
        if [ ! -L /tmp/qnxsdk ] || [ ! "$(readlink /tmp/qnxsdk)" = "$(realpath "${CURRENT_DIR}/${QNXSDK_PATH}")" ]; then
76
        echo "Creating symlink to QNX toolchain in /tmp/qnxsdk..."
93
                echo "Creating symlink to QNX toolchain in /tmp/qnxsdk..."
77
        rm -rf /tmp/qnxsdk 2>/dev/null
94
                rm -rf /tmp/qnxsdk 2>/dev/null
78
        ln -fs "$(realpath "${CURRENT_DIR}/${QNXSDK_PATH}")" /tmp/qnxsdk || exit 1
95
                ln -fs "$(realpath "${CURRENT_DIR}/${QNXSDK_PATH}")" /tmp/qnxsdk || exit 1
-
 
96
        fi
79
fi
97
fi
80
 
98
 
81
# setup the environment
99
# setup the environment
82
export QNX_HOST="/tmp/qnxsdk/${QNXSDK_HOSTPATH}"
100
export QNX_HOST="/tmp/qnxsdk/${QNXSDK_HOSTPATH}"
83
export QNX_TARGET="/tmp/qnxsdk/${QNXSDK_TARGETPATH}"
101
export QNX_TARGET="/tmp/qnxsdk/${QNXSDK_TARGETPATH}"