File tree Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Expand file tree Collapse file tree 1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change 27
27
exit 1
28
28
fi
29
29
30
+ # Enabling source repository
31
+ sed -i ' s/^\(Types: deb\)$/\1 deb-src/g' /etc/apt/sources.list.d/debian.sources
30
32
31
- mkdir -p " $OUTPUT_DIR "
32
- OUTPUT_DIR=$( realpath " $OUTPUT_DIR " )
33
+ # Installing newlib build dependencies
34
+ apt update
35
+ apt install -y --no-install-recommends texinfo dpkg-dev
36
+
37
+ # Get the latest fixed version for this OS version
38
+ apt source newlib
33
39
40
+ # Entering the source directory
41
+ cd * /
34
42
35
43
# ENV SETUP
36
44
WORKDIR=" $( pwd) "
37
- SRC=" ${WORKDIR} /newlib"
38
- BUILD=" ${SRC} /arm_none_eabi_build"
39
- INSTALL=" ${SRC} /arm_none_eabi_install"
40
- cd " ${WORKDIR} "
41
-
42
- # Installing newlib build dependencies
43
- apt update
44
- apt install -y --no-install-recommends texinfo
45
-
46
- # Get the latest fixed version
47
- git clone --depth=1 --single-branch --branch newlib-4.5.0 https://sourceware.org/git/newlib-cygwin.git " ${SRC} "
45
+ # SRC="${WORKDIR}/newlib"
46
+ BUILD=" ${WORKDIR} /arm_none_eabi_build"
47
+ INSTALL=" ${WORKDIR} /arm_none_eabi_install"
48
48
49
49
# Build configuration
50
50
mkdir -p " ${BUILD} " " ${INSTALL} "
@@ -86,6 +86,7 @@ arm-none-eabi-strip --strip-debug "${INSTALL}/arm-none-eabi/lib/libc.a"
86
86
arm-none-eabi-strip --strip-debug " ${INSTALL} /arm-none-eabi/lib/libm.a"
87
87
88
88
# Copy back
89
+ OUTPUT_DIR=$( realpath " $OUTPUT_DIR " )
89
90
mkdir -p " $OUTPUT_DIR "
90
91
cp " ${INSTALL} /arm-none-eabi/lib/libc.a" " $OUTPUT_DIR "
91
92
cp " ${INSTALL} /arm-none-eabi/lib/libm.a" " $OUTPUT_DIR "
You can’t perform that action at this time.
0 commit comments