Subversion Repositories QNX 8.QNX8 GNU binutils

Rev

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

Rev 1 Rev 2
Line 6... Line 6...
6
export QNXSDK_VERSION="8.0.0" # version of the QNX SDK in use, in <major>.<minor>.<revision> format
6
export QNXSDK_VERSION="8.0.0" # version of the QNX SDK in use, in <major>.<minor>.<revision> format
7
export QNXSDK_PATH="../qnx800" # relative location from the path of this script where to find the QNX platform SDK
7
export QNXSDK_PATH="../qnx800" # relative location from the path of this script where to find the QNX platform SDK
8
export QNXSDK_HOSTPATH="host/linux/x86_64" # relative location in QNXSDK_PATH of the tree containing the build tools that are runnable on the build host
8
export QNXSDK_HOSTPATH="host/linux/x86_64" # relative location in QNXSDK_PATH of the tree containing the build tools that are runnable on the build host
9
export QNXSDK_TARGETPATH="target/qnx" # relative location in QNXSDK_PATH of the tree containing the QNX8 system header files
9
export QNXSDK_TARGETPATH="target/qnx" # relative location in QNXSDK_PATH of the tree containing the QNX8 system header files
10
 
10
 
11
export BUILD_DIR_NAME="binutils-build" # name of the directory on the build host's desktop where the GCC sources will be built
11
export BUILD_DIR_NAME="binutils-build" # name of the directory on the build host's desktop where the GNU binutils sources will be built
12
export BUILD_TARGET_ARCH="x86_64" # CPU architecture to build GCC for, either "x86_64" or "aarch64"
12
export BUILD_TARGET_ARCHS="x86_64 aarch64" # space-separated list of CPU architectures to build the GNU binutils for, among "x86_64" and "aarch64"
13
 
13
 
14
export BINUTILS_VERSION="2.41" # version of GNU binutils that will be built. Should match the Win32 and Linux tools.
14
export BINUTILS_VERSION="2.41" # version of GNU binutils that will be built. Should match the Win32 and Linux tools.
15
 
15
 
16
export BINUTILS_SOURCES_FILE="binutils-${BINUTILS_VERSION}.tar.gz" # name of the file containing GNU binutils version BINUTILS_VERSION sources
16
export BINUTILS_SOURCES_FILE="binutils-${BINUTILS_VERSION}.tar.gz" # name of the file containing GNU binutils version BINUTILS_VERSION sources
17
export BINUTILS_SOURCES_URL="https://ftp.gnu.org/gnu/binutils/${BINUTILS_SOURCES_FILE}" # download URL of BINUTILS_SOURCES_FILE
17
export BINUTILS_SOURCES_URL="https://ftp.gnu.org/gnu/binutils/${BINUTILS_SOURCES_FILE}" # download URL of BINUTILS_SOURCES_FILE
Line 29... Line 29...
29
fi
29
fi
30
 
30
 
31
# verify that we have the QNX platform SDK
31
# verify that we have the QNX platform SDK
32
if [ ! -d "${QNXSDK_PATH}/${QNXSDK_HOSTPATH}" ] || [ ! -d "${QNXSDK_PATH}/${QNXSDK_TARGETPATH}" ]; then
32
if [ ! -d "${QNXSDK_PATH}/${QNXSDK_HOSTPATH}" ] || [ ! -d "${QNXSDK_PATH}/${QNXSDK_TARGETPATH}" ]; then
33
        echo ""
33
        echo ""
34
        echo "Error: the ${QNXSDK_PATH} path doesn't contain a QNX SDK. It must contain the 'host' and 'target' directories of the QNX SDP for the targeted version of QNX and the ${BUILD_TARGET_ARCH} platform. Please deploy these directories and try again." | fold -s -w 79
34
        echo "Error: the ${QNXSDK_PATH} path doesn't contain a QNX SDK. It must contain the 'host' and 'target' directories of the QNX SDP for the targeted version of QNX and the ${BUILD_TARGET_ARCHS} platform(s). Please deploy these directories and try again." | fold -s -w 79
35
        echo ""
35
        echo ""
36
        exit 1
36
        exit 1
37
fi
37
fi
38
 
38
 
39
# verify that we have wget, python3, cmake, gcc, g++ and m4
39
# verify that we have wget, python3, cmake, gcc, g++ and m4
40
if    ! wget    --version > /dev/null 2>&1 \
40
if    ! wget    --version > /dev/null 2>&1 \
41
   || ! python3 --version > /dev/null 2>&1 \
41
   || ! python3 --version > /dev/null 2>&1 \
42
   || ! cmake   --version > /dev/null 2>&1 \
42
   || ! make    --version > /dev/null 2>&1 \
43
   || ! gcc     --version > /dev/null 2>&1 \
43
   || ! gcc     --version > /dev/null 2>&1 \
44
   || ! g++     --version > /dev/null 2>&1 \
44
   || ! g++     --version > /dev/null 2>&1 \
45
   || ! m4      --version > /dev/null 2>&1; then
45
   || ! m4      --version > /dev/null 2>&1; then
46
        echo ""
46
        echo ""
47
        echo "Error: this script requires at the very least the following tools installed:"
47
        echo "Error: this script requires at the very least the following tools installed:"
48
        echo "  wget"
48
        echo "  wget"
49
        echo "  python3"
49
        echo "  python3"
50
        echo cmake"
50
        echo make"
51
        echo "  gcc"
51
        echo "  gcc"
52
        echo "  g++"
52
        echo "  g++"
53
        echo "  m4"
53
        echo "  m4"
54
        echo "Please install them (possibly as binary packages with apt-get) and try again."
54
        echo "Please install them (possibly as binary packages with apt-get) and try again."
55
        echo ""
55
        echo ""
Line 70... Line 70...
70
               "\"" | fold -s -w 79
70
               "\"" | fold -s -w 79
71
        echo "Note that this step WILL take time on a Win32 machine, but is only done once." | fold -s -w 79
71
        echo "Note that this step WILL take time on a Win32 machine, but is only done once." | fold -s -w 79
72
        echo ""
72
        echo ""
73
        exit 1
73
        exit 1
74
fi
74
fi
75
 
-
 
76
# construct the target triple (actually a quadruple)
-
 
77
export TARGET_ARCH="${BUILD_TARGET_ARCH}"
-
 
78
test "${BUILD_TARGET_ARCH}" = "x86_64" && export TARGET_VENDOR="pc" || export TARGET_VENDOR="unknown"
-
 
79
export TARGET_KERNEL="nto"
-
 
80
export TARGET_SYSTEM="qnx${QNXSDK_VERSION}"
-
 
81
export TARGET_TRIPLE="${TARGET_ARCH}-${TARGET_VENDOR}-${TARGET_KERNEL}-${TARGET_SYSTEM}"
-
 
82
echo "Will build for ${TARGET_TRIPLE}"
-
 
83
 
-
 
84
# change to an immediately visible path, i.e. the user's desktop (failsafe to $HOME if xdg-user-dir is unavailable)
-
 
85
STAGING_PATH="$(xdg-user-dir DESKTOP 2>/dev/null || echo "${HOME}")"
-
 
86
cd "${STAGING_PATH}"
-
 
87
 
75
 
88
# 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
76
# 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
89
# (this is totally prohibitive with the official QNX toolchain)
77
# (this is totally prohibitive with the official QNX toolchain)
90
if [ ! -L /tmp/qnxsdk ] || [ ! "$(readlink /tmp/qnxsdk)" = "$(realpath "${CURRENT_DIR}/${QNXSDK_PATH}")" ]; then
78
if [ ! -L /tmp/qnxsdk ] || [ ! "$(readlink /tmp/qnxsdk)" = "$(realpath "${CURRENT_DIR}/${QNXSDK_PATH}")" ]; then
91
        echo "Creating symlink to QNX toolchain in /tmp/qnxsdk..."
79
        echo "Creating symlink to QNX toolchain in /tmp/qnxsdk..."
Line 96... Line 84...
96
# setup the environment
84
# setup the environment
97
export QNX_HOST="/tmp/qnxsdk/${QNXSDK_HOSTPATH}"
85
export QNX_HOST="/tmp/qnxsdk/${QNXSDK_HOSTPATH}"
98
export QNX_TARGET="/tmp/qnxsdk/${QNXSDK_TARGETPATH}"
86
export QNX_TARGET="/tmp/qnxsdk/${QNXSDK_TARGETPATH}"
99
export MAKEFLAGS="-I${QNX_TARGET}/usr/include"
87
export MAKEFLAGS="-I${QNX_TARGET}/usr/include"
100
export PATH="${QNX_HOST}/usr/bin:${PATH}"
88
export PATH="${QNX_HOST}/usr/bin:${PATH}"
-
 
89
 
-
 
90
# print the build environment
-
 
91
echo "QNX_HOST=${QNX_HOST}"
-
 
92
echo "QNX_TARGET=${QNX_TARGET}"
-
 
93
echo "MAKEFLAGS=${MAKEFLAGS}"
-
 
94
 
-
 
95
# change to an immediately visible path, i.e. the user's desktop (failsafe to $HOME if xdg-user-dir is unavailable)
-
 
96
STAGING_PATH="$(xdg-user-dir DESKTOP 2>/dev/null || echo "${HOME}")"
-
 
97
cd "${STAGING_PATH}"
101
 
98
 
102
# download the involved source packages and unpack them if not done yet
99
# download the involved source packages and unpack them if not done yet
103
download_and_unpack_if_necessary()
100
download_and_unpack_if_necessary()
104
{
101
{
105
        # helper function that downloads a sources tarball, extracts it and patches it if necessary
102
        # helper function that downloads a sources tarball, extracts it and patches it if necessary
Line 124... Line 121...
124
        elif echo "${2}"|grep -q "\.tar\.gz$"; then
121
        elif echo "${2}"|grep -q "\.tar\.gz$"; then
125
                # GZipped tarball
122
                # GZipped tarball
126
                tar xzf "${CURRENT_DIR}/${2}" || exit 1
123
                tar xzf "${CURRENT_DIR}/${2}" || exit 1
127
        else
124
        else
128
                echo "Error: unsupported file extension. Please improve the download_and_unpack_if_necessary() shell function to support it."
125
                echo "Error: unsupported file extension. Please improve the download_and_unpack_if_necessary() shell function to support it."
129
                exit 1
126
                exit 1
130
        fi
127
        fi
131
        # make sure the expected directory is here after extraction
128
        # make sure the expected directory is here after extraction
132
        if [ ! -d "${1}" ]; then
129
        if [ ! -d "${1}" ]; then
133
                echo "Error: couldn't find ${1} in extracted sources."
130
                echo "Error: couldn't find ${1} in extracted sources."
134
                exit 1
131
                exit 1
135
        fi
132
        fi
Line 141... Line 138...
141
                OLDDIR="$(pwd)"
138
                OLDDIR="$(pwd)"
142
                cd "${1}"
139
                cd "${1}"
143
                patch -N -Z -p1 < "${CURRENT_DIR}/${2}.patchset" || exit 1
140
                patch -N -Z -p1 < "${CURRENT_DIR}/${2}.patchset" || exit 1
144
                cd "${OLDDIR}"
141
                cd "${OLDDIR}"
145
                unset OLDDIR
142
                unset OLDDIR
146
        fi
143
        fi
147
        return 0
144
        return 0
148
}
145
}
149
download_and_unpack_if_necessary "${BINUTILS_SOURCES_DIR}" "${BINUTILS_SOURCES_FILE}" "${BINUTILS_SOURCES_URL}" || exit 1
146
download_and_unpack_if_necessary "${BINUTILS_SOURCES_DIR}" "${BINUTILS_SOURCES_FILE}" "${BINUTILS_SOURCES_URL}" || exit 1
150
 
147
 
151
# print the build environment
-
 
152
echo "QNX_HOST=${QNX_HOST}"
-
 
153
echo "QNX_TARGET=${QNX_TARGET}"
-
 
154
echo "MAKEFLAGS=${MAKEFLAGS}"
-
 
155
 
-
 
156
# change directory to the binutils sources
148
# change directory to the binutils sources
157
cd "${BINUTILS_SOURCES_DIR}"
149
cd "${BINUTILS_SOURCES_DIR}" || exit 1
158
 
-
 
159
# create the build directory
-
 
160
echo "Wiping out build directory..."
-
 
161
test -e .build && rm -rf .build
-
 
162
mkdir .build || exit 1
-
 
163
ln -fs "${BINUTILS_SOURCES_DIR}/.build" "../${BUILD_DIR_NAME}"
-
 
164
cd .build
-
 
165
 
150
 
166
backup_and_patch_if_necessary()
151
backup_and_patch_if_necessary()
167
{
152
{
168
        # handy function that patches a file in .. with a given sed replacement regex if necessary, creating backups
153
        # handy function that patches a file in the current directory with a given sed replacement regex if necessary, creating backups
169
        # args: <file pathname> <grep_string_to_test_for_presence_of_patch> <sed regex>
154
        # args: <file pathname> <grep_string_to_test_for_presence_of_patch> <sed regex>
170
        # test if already patched
155
        # test if already patched
171
        grep -q "${2}" "../${1}" && return
156
        grep -q "${2}" "${1}" && return
172
        # tell what we're about to do
157
        # tell what we're about to do
173
        echo "Patching ${1}..."
158
        echo "Patching ${1}..."
174
        # have a backup first
159
        # have a backup first
175
        test -f "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]" || cp "../${1}" "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]" || exit 1
160
        test -f "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]" || cp "${1}" "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]" || exit 1
176
        # perform the patch
161
        # perform the patch
177
        sed -E "${3}" "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]" > "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [PATCHED]"
162
        sed -E "${3}" "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]" > "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [PATCHED]"
178
        # verify that we did it successfully
163
        # verify that we did it successfully
179
        if ! grep -q "${2}" "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [PATCHED]"; then
164
        if ! grep -q "${2}" "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [PATCHED]"; then
180
                echo "Error: the file ${1} could not be patched. Please investigate and fix manually." | fold -s -w 79; exit 1
165
                echo "Error: the file ${1} could not be patched. Please investigate and fix manually." | fold -s -w 79; exit 1
181
        fi
166
        fi
182
        # and put the patched file in place
167
        # and put the patched file in place
183
        cp -f "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [PATCHED]" "../${1}" || exit 1
168
        cp -f "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [PATCHED]" "${1}" || exit 1
184
}
169
}
185
backup_and_replace()
170
backup_and_replace()
186
{
171
{
187
        # handy function that replaces a file in .. with a given replacement, creating backups
172
        # handy function that replaces a file in the current directory with a given replacement, creating backups
188
        # args: <file pathname> <replacement pathname>
173
        # args: <file pathname> <replacement pathname>
189
        # tell what we're about to do
174
        # tell what we're about to do
190
        echo "Replacing ${1}..."
175
        echo "Replacing ${1}..."
191
        # have a backup first
176
        # have a backup first
192
        test -f "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]" || test -e "../${1}" && cp "../${1}" "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]"
177
        test -f "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]" || test -e "${1}" && cp "${1}" "${CURRENT_DIR}/$(echo "${1}"|tr '/' '.') [ORIGINAL]"
193
        # perform the replacement
178
        # perform the replacement
194
        cp -f "${2}" "../${1}" || exit 1
179
        cp -f "${2}" "${1}" || exit 1
195
}
180
}
196
 
181
 
197
# patch libiberty/pex-unix.c
182
# patch libiberty/pex-unix.c
198
# RATIONALE: QNX exposes the same spawnve() functions which were invented by Microsoft. Autoconf mistakenly believes it's a Cygwin system.
183
# RATIONALE: QNX exposes the same spawnve() functions which were invented by Microsoft. Autoconf mistakenly believes it's a Cygwin system.
199
# Moreover the flags _P_NOWAIT and _P_NOWAITO don't have the same meaning on QNX: the second one doesn't create zombies waiting for their exit
184
# Moreover the flags _P_NOWAIT and _P_NOWAITO don't have the same meaning on QNX: the second one doesn't create zombies waiting for their exit
Line 216... Line 201...
216
export NM_FOR_BUILD="/usr/bin/nm"
201
export NM_FOR_BUILD="/usr/bin/nm"
217
export RANLIB_FOR_BUILD="/usr/bin/ranlib"
202
export RANLIB_FOR_BUILD="/usr/bin/ranlib"
218
export CC_FOR_BUILD="/usr/bin/gcc"; CFLAGS_FOR_BUILD="-fuse-ld=${LD_FOR_BUILD}"
203
export CC_FOR_BUILD="/usr/bin/gcc"; CFLAGS_FOR_BUILD="-fuse-ld=${LD_FOR_BUILD}"
219
export CXX_FOR_BUILD="/usr/bin/g++"; CXXFLAGS_FOR_BUILD="-fuse-ld=${LD_FOR_BUILD}"
204
export CXX_FOR_BUILD="/usr/bin/g++"; CXXFLAGS_FOR_BUILD="-fuse-ld=${LD_FOR_BUILD}"
220
 
205
 
221
# configure and build the GNU binutils. Note that since these are low level tools, we want static binaries as much as possible.
206
# now, for each target arch the native binutils should support...
222
../configure \
-
 
223
    --prefix="$(dirname "$(dirname "${QNX_HOST}")")/qnx$(echo "${QNXSDK_VERSION}"|awk -F. '{print $1}')/${BUILD_TARGET_ARCH}/usr" \
-
 
224
    --host="${TARGET_TRIPLE}" \
-
 
225
    --target="${TARGET_TRIPLE}" \
207
for BUILD_TARGET_ARCH in ${BUILD_TARGET_ARCHS}; do
226
    --disable-shared \
-
 
227
    --disable-nls \
-
 
228
    --enable-static-link \
-
 
229
    --disable-shared-plugins \
-
 
230
    --disable-dynamicplugin \
-
 
231
    --disable-pie \
-
 
232
    --enable-static=yes \
-
 
233
    --enable-shared=no \
-
 
234
    --disable-doc || exit 1
-
 
235
 
208
 
236
# and build the whole shit
209
        # construct the target triple (actually a quadruple)
-
 
210
        TARGET_ARCH="${BUILD_TARGET_ARCH}"
-
 
211
        test "${BUILD_TARGET_ARCH}" = "x86_64" && TARGET_VENDOR="pc" || TARGET_VENDOR="unknown"
-
 
212
        TARGET_KERNEL="nto"
237
make -j 4 MAKEINFO=/bin/true || exit 1
213
        TARGET_SYSTEM="qnx${QNXSDK_VERSION}"
-
 
214
        export TARGET_TRIPLE="${TARGET_ARCH}-${TARGET_VENDOR}-${TARGET_KERNEL}-${TARGET_SYSTEM}"
-
 
215
        echo "Will build for ${TARGET_TRIPLE}"
238
 
216
 
-
 
217
        # create the build directory
-
 
218
        echo "Wiping out build directory..."
-
 
219
        test -e ".build/${TARGET_TRIPLE}" && rm -rf ".build/${TARGET_TRIPLE}"
-
 
220
        mkdir -p ".build/${TARGET_TRIPLE}" || exit 1
-
 
221
        ln -fs "${BINUTILS_SOURCES_DIR}/.build" "../${BUILD_DIR_NAME}"
-
 
222
        cd ".build/${TARGET_TRIPLE}"
-
 
223
 
-
 
224
        # configure and build the GNU binutils. Note that since these are low level tools, we want static binaries as much as possible.
-
 
225
        # NOTE: in this context, --host means the machine the built program is expected to RUN on, and --target the machine the built program will FOCUS on.
-
 
226
        ../../configure \
-
 
227
                --prefix="$(dirname "$(dirname "${QNX_HOST}")")/qnx$(echo "${QNXSDK_VERSION}"|awk -F. '{print $1}')/${BUILD_TARGET_ARCH}/usr" \
-
 
228
                --host="x86_64-pc-nto-qnx${QNXSDK_VERSION}" \
-
 
229
                --target="${TARGET_TRIPLE}" \
-
 
230
                --disable-shared \
-
 
231
                --disable-nls \
-
 
232
                --enable-static-link \
-
 
233
                --disable-shared-plugins \
-
 
234
                --disable-dynamicplugin \
-
 
235
                --disable-pie \
-
 
236
                --enable-static=yes \
-
 
237
                --enable-shared=no \
-
 
238
                --disable-doc || exit 1
-
 
239
 
-
 
240
        # and build the whole shit
-
 
241
        make -j 4 MAKEINFO=/bin/true || exit 1
-
 
242
 
239
# now gather all the binutils in one place on the hypervisor's filesystem and name them appropriately
243
        # now gather all the binutils in one place on the hypervisor's filesystem and name them appropriately
240
test -e "${CURRENT_DIR}/binutils-build" && rm -rf "${CURRENT_DIR}/binutils-build"
244
        test -e "${CURRENT_DIR}/binutils-build" || mkdir -p "${CURRENT_DIR}/binutils-build"
241
mkdir -p "${CURRENT_DIR}/binutils-build"
245
        rm "${CURRENT_DIR}/binutils-build/${TARGET_TRIPLE}-"* 2>/dev/null
242
VERSION="$(grep PACKAGE_VERSION opcodes/config.h|awk -F'"' '{print $2}')"
246
        VERSION="$(grep PACKAGE_VERSION opcodes/config.h|awk -F'"' '{print $2}')"
243
VERSION_MAJ="$(echo "${VERSION}"|cut -d . -f 1)"; test -z "${VERSION_MAJ}" && VERSION_MAJ="0"
247
        VERSION_MAJ="$(echo "${VERSION}"|cut -d . -f 1)"; test -z "${VERSION_MAJ}" && VERSION_MAJ="0"
244
VERSION_MIN="$(echo "${VERSION}"|cut -d . -f 2)"; test -z "${VERSION_MIN}" && VERSION_MIN="0"
248
        VERSION_MIN="$(echo "${VERSION}"|cut -d . -f 2)"; test -z "${VERSION_MIN}" && VERSION_MIN="0"
245
VERSION_REV="$(echo "${VERSION}"|cut -d . -f 3)"; test -z "${VERSION_REV}" && VERSION_REV="0"
249
        VERSION_REV="$(echo "${VERSION}"|cut -d . -f 3)"; test -z "${VERSION_REV}" && VERSION_REV="0"
-
 
250
        for TOOL in \
246
for TOOL in binutils/addr2line:addr2line \
251
                        binutils/addr2line:addr2line \
247
            binutils/ar:ar \
252
                        binutils/ar:ar \
248
            gas/as-new:as \
253
                        gas/as-new:as \
249
            binutils/cxxfilt:c++filt \
254
                        binutils/cxxfilt:c++filt \
250
            binutils/elfedit:elfedit \
255
                        binutils/elfedit:elfedit \
251
            gprof/gprof:gprof \
256
                        gprof/gprof:gprof \
252
            ld/ld-new:ld.bfd \
257
                        ld/ld-new:ld.bfd \
253
            binutils/nm-new:nm \
258
                        binutils/nm-new:nm \
254
            binutils/objcopy:objcopy \
259
                        binutils/objcopy:objcopy \
255
            binutils/objdump:objdump \
260
                        binutils/objdump:objdump \
256
            binutils/ranlib:ranlib \
261
                        binutils/ranlib:ranlib \
257
            binutils/readelf:readelf \
262
                        binutils/readelf:readelf \
258
            binutils/size:size \
263
                        binutils/size:size \
259
            binutils/strings:strings \
264
                        binutils/strings:strings \
260
            binutils/strip-new:strip \
265
                        binutils/strip-new:strip \
261
        ; do
266
        ; do
262
        SRC="$(echo "${TOOL}"|cut -d : -f 1)"
267
                SRC="$(echo "${TOOL}"|cut -d : -f 1)"
263
        TGT="$(echo "${TOOL}"|cut -d : -f 2)"
268
                TGT="$(echo "${TOOL}"|cut -d : -f 2)"
264
        cp "${SRC}" "${CURRENT_DIR}/binutils-build/${TARGET_TRIPLE}-${TGT}-${VERSION_MAJ}.${VERSION_MIN}.${VERSION_REV}" || exit 1
269
                cp "${SRC}" "${CURRENT_DIR}/binutils-build/${TARGET_TRIPLE}-${TGT}-${VERSION_MAJ}.${VERSION_MIN}.${VERSION_REV}" || exit 1
-
 
270
        done
-
 
271
 
-
 
272
        # return to the sources dir and proceed to the next arch
-
 
273
        cd ../..
265
done
274
done
266
 
275
 
267
echo "Tea time."
276
echo "Tea time."
268
exit 0
277
exit 0