Advertisement
Guest User

Untitled

a guest
Dec 15th, 2015
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 22.83 KB | None | 0 0
  1. From 9ba6f4c25c50ce80c9195c45df7fab9d1e1c8152 Mon Sep 17 00:00:00 2001
  2. From: "tdos.apone" <toemossgarcia@gmail.com>
  3. Date: Thu, 10 Dec 2015 11:03:09 -0600
  4. Subject: [PATCH 1/3] initial big-endian attempt
  5.  
  6. ---
  7. build-toolchain.sh | 8 ++++++--
  8. 1 file changed, 6 insertions(+), 2 deletions(-)
  9.  
  10. diff --git a/build-toolchain.sh b/build-toolchain.sh
  11. index 55d508d..d8aef12 100755
  12. --- a/build-toolchain.sh
  13. +++ b/build-toolchain.sh
  14. @@ -299,6 +299,7 @@ $SRCDIR/$GCC/configure --target=$TARGET \
  15. --disable-tls \
  16. --with-newlib \
  17. --without-headers \
  18. + --with-endian=big \
  19. --with-gnu-as \
  20. --with-gnu-ld \
  21. --with-python-dir=share/gcc-arm-none-eabi \
  22. @@ -323,7 +324,7 @@ popd
  23. echo Task [III-2] /$HOST_NATIVE/newlib/
  24. saveenv
  25. prepend_path PATH $INSTALLDIR_NATIVE/bin
  26. -saveenvvar CFLAGS_FOR_TARGET '-g -O2 -ffunction-sections -fdata-sections'
  27. +saveenvvar CFLAGS_FOR_TARGET '-g -O2 -ffunction-sections -fdata-sections -mbig-endian'
  28. rm -rf $BUILDDIR_NATIVE/newlib && mkdir -p $BUILDDIR_NATIVE/newlib
  29. pushd $BUILDDIR_NATIVE/newlib
  30.  
  31. @@ -362,7 +363,7 @@ restoreenv
  32. echo Task [III-3] /$HOST_NATIVE/newlib-nano/
  33. saveenv
  34. prepend_path PATH $INSTALLDIR_NATIVE/bin
  35. -saveenvvar CFLAGS_FOR_TARGET '-g -Os -ffunction-sections -fdata-sections'
  36. +saveenvvar CFLAGS_FOR_TARGET '-g -Os -ffunction-sections -fdata-sections -mbig-endian'
  37. rm -rf $BUILDDIR_NATIVE/newlib-nano && mkdir -p $BUILDDIR_NATIVE/newlib-nano
  38. pushd $BUILDDIR_NATIVE/newlib-nano
  39.  
  40. @@ -415,6 +416,7 @@ $SRCDIR/$GCC/configure --target=$TARGET \
  41. --disable-shared \
  42. --disable-threads \
  43. --disable-tls \
  44. + --with-endian=big \
  45. --with-gnu-as \
  46. --with-gnu-ld \
  47. --with-newlib \
  48. @@ -477,6 +479,7 @@ $SRCDIR/$GCC/configure --target=$TARGET \
  49. --disable-shared \
  50. --disable-threads \
  51. --disable-tls \
  52. + --with-endian=big \
  53. --with-gnu-as \
  54. --with-gnu-ld \
  55. --with-newlib \
  56. @@ -759,6 +762,7 @@ $SRCDIR/$GCC/configure --build=$BUILD --host=$HOST_MINGW --target=$TARGET \
  57. --disable-shared \
  58. --disable-threads \
  59. --disable-tls \
  60. + --with-endian=big \
  61. --with-gnu-as \
  62. --with-gnu-ld \
  63. --with-headers=yes \
  64. --
  65. 2.6.2
  66.  
  67.  
  68. From 2f0a34df5ae826dff88e71c81a07925c1315025c Mon Sep 17 00:00:00 2001
  69. From: "tdos.apone" <toemossgarcia@gmail.com>
  70. Date: Thu, 10 Dec 2015 12:37:29 -0600
  71. Subject: [PATCH 2/3] arm-none-eabi->armeb-none-eabi
  72.  
  73. ---
  74. build-common.sh | 6 +--
  75. build-toolchain.sh | 127 +++++++++++++++++++++++++++--------------------------
  76. 2 files changed, 67 insertions(+), 66 deletions(-)
  77.  
  78. diff --git a/build-common.sh b/build-common.sh
  79. index 21e3f97..6b11084 100755
  80. --- a/build-common.sh
  81. +++ b/build-common.sh
  82. @@ -250,9 +250,9 @@ SRCDIR=$ROOT/src
  83. BUILDDIR_NATIVE=$ROOT/build-native
  84. BUILDDIR_MINGW=$ROOT/build-mingw
  85. INSTALLDIR_NATIVE=$ROOT/install-native
  86. -INSTALLDIR_NATIVE_DOC=$ROOT/install-native/share/doc/gcc-arm-none-eabi
  87. +INSTALLDIR_NATIVE_DOC=$ROOT/install-native/share/doc/gcc-armeb-none-eabi
  88. INSTALLDIR_MINGW=$ROOT/install-mingw
  89. -INSTALLDIR_MINGW_DOC=$ROOT/install-mingw/share/doc/gcc-arm-none-eabi
  90. +INSTALLDIR_MINGW_DOC=$ROOT/install-mingw/share/doc/gcc-armeb-none-eabi
  91.  
  92. PACKAGEDIR=$ROOT/pkg
  93.  
  94. @@ -313,7 +313,7 @@ GCC_VER_NAME=`echo $GCC_VER | cut -d'.' -f1,2 | sed -e 's/\./_/g'`
  95. GCC_VER_SHORT=`echo $GCC_VER_NAME | sed -e 's/_/\./g'`
  96. HOST_MINGW=i686-w64-mingw32
  97. HOST_MINGW_TOOL=i686-w64-mingw32
  98. -TARGET=arm-none-eabi
  99. +TARGET=armeb-none-eabi
  100. ENV_CFLAGS=
  101. ENV_CPPFLAGS=
  102. ENV_LDFLAGS=
  103. diff --git a/build-toolchain.sh b/build-toolchain.sh
  104. index d8aef12..b3fbfba 100755
  105. --- a/build-toolchain.sh
  106. +++ b/build-toolchain.sh
  107. @@ -89,7 +89,8 @@ skip_mingw32_gdb_with_python=no
  108. build_type=
  109. build_tools=
  110.  
  111. for ac_arg; do
  112. case $ac_arg in
  113. @@ -252,7 +253,7 @@ $SRCDIR/$BINUTILS/configure \
  114. --disable-werror \
  115. --enable-interwork \
  116. --enable-plugins \
  117. - --with-sysroot=$INSTALLDIR_NATIVE/arm-none-eabi \
  118. + --with-sysroot=$INSTALLDIR_NATIVE/armeb-none-eabi \
  119. "--with-pkgversion=$PKGVERSION"
  120.  
  121. if [ "x$DEBUG_BUILD_OPTIONS" != "x" ] ; then
  122. @@ -302,8 +303,8 @@ $SRCDIR/$GCC/configure --target=$TARGET \
  123. --with-endian=big \
  124. --with-gnu-as \
  125. --with-gnu-ld \
  126. - --with-python-dir=share/gcc-arm-none-eabi \
  127. - --with-sysroot=$INSTALLDIR_NATIVE/arm-none-eabi \
  128. + --with-python-dir=share/gcc-armeb-none-eabi \
  129. + --with-sysroot=$INSTALLDIR_NATIVE/armeb-none-eabi \
  130. ${GCC_CONFIG_OPTS} \
  131. "${GCC_CONFIG_OPTS_LCPP}" \
  132. "--with-pkgversion=$PKGVERSION" \
  133. @@ -316,7 +317,7 @@ make install-gcc
  134. popd
  135.  
  136. pushd $INSTALLDIR_NATIVE
  137. -rm -rf bin/arm-none-eabi-gccbug
  138. +rm -rf bin/armeb-none-eabi-gccbug
  139. rm -rf ./lib/libiberty.a
  140. rm -rf include
  141. popd
  142. @@ -348,13 +349,13 @@ make install
  143. if [ "x$skip_manual" != "xyes" ]; then
  144. make pdf
  145. mkdir -p $INSTALLDIR_NATIVE_DOC/pdf
  146. -cp $BUILDDIR_NATIVE/newlib/arm-none-eabi/newlib/libc/libc.pdf $INSTALLDIR_NATIVE_DOC/pdf/libc.pdf
  147. -cp $BUILDDIR_NATIVE/newlib/arm-none-eabi/newlib/libm/libm.pdf $INSTALLDIR_NATIVE_DOC/pdf/libm.pdf
  148. +cp $BUILDDIR_NATIVE/newlib/armeb-none-eabi/newlib/libc/libc.pdf $INSTALLDIR_NATIVE_DOC/pdf/libc.pdf
  149. +cp $BUILDDIR_NATIVE/newlib/armeb-none-eabi/newlib/libm/libm.pdf $INSTALLDIR_NATIVE_DOC/pdf/libm.pdf
  150.  
  151. make html
  152. mkdir -p $INSTALLDIR_NATIVE_DOC/html
  153. -copy_dir $BUILDDIR_NATIVE/newlib/arm-none-eabi/newlib/libc/libc.html $INSTALLDIR_NATIVE_DOC/html/libc
  154. -copy_dir $BUILDDIR_NATIVE/newlib/arm-none-eabi/newlib/libm/libm.html $INSTALLDIR_NATIVE_DOC/html/libm
  155. +copy_dir $BUILDDIR_NATIVE/newlib/armeb-none-eabi/newlib/libc/libc.html $INSTALLDIR_NATIVE_DOC/html/libc
  156. +copy_dir $BUILDDIR_NATIVE/newlib/armeb-none-eabi/newlib/libm/libm.html $INSTALLDIR_NATIVE_DOC/html/libm
  157. fi
  158.  
  159. popd
  160. @@ -390,8 +391,8 @@ popd
  161. restoreenv
  162.  
  163. echo Task [III-4] /$HOST_NATIVE/gcc-final/
  164. -rm -f $INSTALLDIR_NATIVE/arm-none-eabi/usr
  165. -ln -s . $INSTALLDIR_NATIVE/arm-none-eabi/usr
  166. +rm -f $INSTALLDIR_NATIVE/armeb-none-eabi/usr
  167. +ln -s . $INSTALLDIR_NATIVE/armeb-none-eabi/usr
  168.  
  169. rm -rf $BUILDDIR_NATIVE/gcc-final && mkdir -p $BUILDDIR_NATIVE/gcc-final
  170. pushd $BUILDDIR_NATIVE/gcc-final
  171. @@ -421,8 +422,8 @@ $SRCDIR/$GCC/configure --target=$TARGET \
  172. --with-gnu-ld \
  173. --with-newlib \
  174. --with-headers=yes \
  175. - --with-python-dir=share/gcc-arm-none-eabi \
  176. - --with-sysroot=$INSTALLDIR_NATIVE/arm-none-eabi \
  177. + --with-python-dir=share/gcc-armeb-none-eabi \
  178. + --with-sysroot=$INSTALLDIR_NATIVE/armeb-none-eabi \
  179. $GCC_CONFIG_OPTS \
  180. "${GCC_CONFIG_OPTS_LCPP}" \
  181. "--with-pkgversion=$PKGVERSION" \
  182. @@ -446,8 +447,8 @@ if [ "x$skip_manual" != "xyes" ]; then
  183. fi
  184.  
  185. pushd $INSTALLDIR_NATIVE
  186. -rm -rf bin/arm-none-eabi-gccbug
  187. -LIBIBERTY_LIBRARIES=`find $INSTALLDIR_NATIVE/arm-none-eabi/lib -name libiberty.a`
  188. +rm -rf bin/armeb-none-eabi-gccbug
  189. +LIBIBERTY_LIBRARIES=`find $INSTALLDIR_NATIVE/armeb-none-eabi/lib -name libiberty.a`
  190. for libiberty_lib in $LIBIBERTY_LIBRARIES ; do
  191. rm -rf $libiberty_lib
  192. done
  193. @@ -455,12 +456,12 @@ rm -rf ./lib/libiberty.a
  194. rm -rf include
  195. popd
  196.  
  197. -rm -f $INSTALLDIR_NATIVE/arm-none-eabi/usr
  198. +rm -f $INSTALLDIR_NATIVE/armeb-none-eabi/usr
  199. popd
  200.  
  201. echo Task [III-5] /$HOST_NATIVE/gcc-size-libstdcxx/
  202. -rm -f $BUILDDIR_NATIVE/target-libs/arm-none-eabi/usr
  203. -ln -s . $BUILDDIR_NATIVE/target-libs/arm-none-eabi/usr
  204. +rm -f $BUILDDIR_NATIVE/target-libs/armeb-none-eabi/usr
  205. +ln -s . $BUILDDIR_NATIVE/target-libs/armeb-none-eabi/usr
  206.  
  207. rm -rf $BUILDDIR_NATIVE/gcc-size-libstdcxx && mkdir -p $BUILDDIR_NATIVE/gcc-size-libstdcxx
  208. pushd $BUILDDIR_NATIVE/gcc-size-libstdcxx
  209. @@ -484,8 +485,8 @@ $SRCDIR/$GCC/configure --target=$TARGET \
  210. --with-gnu-ld \
  211. --with-newlib \
  212. --with-headers=yes \
  213. - --with-python-dir=share/gcc-arm-none-eabi \
  214. - --with-sysroot=$BUILDDIR_NATIVE/target-libs/arm-none-eabi \
  215. + --with-python-dir=share/gcc-armeb-none-eabi \
  216. + --with-sysroot=$BUILDDIR_NATIVE/target-libs/armeb-none-eabi \
  217. $GCC_CONFIG_OPTS \
  218. "${GCC_CONFIG_OPTS_LCPP}" \
  219. "--with-pkgversion=$PKGVERSION" \
  220. @@ -494,15 +495,15 @@ $SRCDIR/$GCC/configure --target=$TARGET \
  221. make -j$JOBS CXXFLAGS_FOR_TARGET="-g -Os -ffunction-sections -fdata-sections -fno-exceptions"
  222. make install
  223.  
  224. -copy_multi_libs src_prefix="$BUILDDIR_NATIVE/target-libs/arm-none-eabi/lib" \
  225. - dst_prefix="$INSTALLDIR_NATIVE/arm-none-eabi/lib" \
  226. - target_gcc="$BUILDDIR_NATIVE/target-libs/bin/arm-none-eabi-gcc"
  227. +copy_multi_libs src_prefix="$BUILDDIR_NATIVE/target-libs/armeb-none-eabi/lib" \
  228. + dst_prefix="$INSTALLDIR_NATIVE/armeb-none-eabi/lib" \
  229. + target_gcc="$BUILDDIR_NATIVE/target-libs/bin/armeb-none-eabi-gcc"
  230.  
  231. # Copy the nano configured newlib.h file into the location that nano.specs
  232. # expects it to be.
  233. -mkdir -p $INSTALLDIR_NATIVE/arm-none-eabi/include/newlib-nano
  234. -cp -f $BUILDDIR_NATIVE/target-libs/arm-none-eabi/include/newlib.h \
  235. - $INSTALLDIR_NATIVE/arm-none-eabi/include/newlib-nano/newlib.h
  236. +mkdir -p $INSTALLDIR_NATIVE/armeb-none-eabi/include/newlib-nano
  237. +cp -f $BUILDDIR_NATIVE/target-libs/armeb-none-eabi/include/newlib.h \
  238. + $INSTALLDIR_NATIVE/armeb-none-eabi/include/newlib-nano/newlib.h
  239.  
  240. popd
  241.  
  242. @@ -533,10 +534,10 @@ build_gdb()
  243. --disable-gprof \
  244. --with-libexpat \
  245. --with-lzma=no \
  246. - --with-system-gdbinit=$INSTALLDIR_NATIVE/$HOST_NATIVE/arm-none-eabi/lib/gdbinit \
  247. + --with-system-gdbinit=$INSTALLDIR_NATIVE/$HOST_NATIVE/armeb-none-eabi/lib/gdbinit \
  248. $GDB_CONFIG_OPTS \
  249. $GDB_EXTRA_CONFIG_OPTS \
  250. - '--with-gdb-datadir='\''${prefix}'\''/arm-none-eabi/share/gdb' \
  251. + '--with-gdb-datadir='\''${prefix}'\''/armeb-none-eabi/share/gdb' \
  252. "--with-pkgversion=$PKGVERSION"
  253.  
  254. if [ "x$DEBUG_BUILD_OPTIONS" != "x" ] ; then
  255. @@ -591,17 +592,17 @@ find $INSTALLDIR_NATIVE -name '*.la' -exec rm '{}' ';'
  256.  
  257. echo Task [III-9] /$HOST_NATIVE/strip_host_objects/
  258. if [ "x$DEBUG_BUILD_OPTIONS" = "x" ] ; then
  259. - STRIP_BINARIES=`find $INSTALLDIR_NATIVE/bin/ -name arm-none-eabi-\*`
  260. + STRIP_BINARIES=`find $INSTALLDIR_NATIVE/bin/ -name armeb-none-eabi-\*`
  261. for bin in $STRIP_BINARIES ; do
  262. strip_binary strip $bin
  263. done
  264.  
  265. - STRIP_BINARIES=`find $INSTALLDIR_NATIVE/arm-none-eabi/bin/ -maxdepth 1 -mindepth 1 -name \*`
  266. + STRIP_BINARIES=`find $INSTALLDIR_NATIVE/armeb-none-eabi/bin/ -maxdepth 1 -mindepth 1 -name \*`
  267. for bin in $STRIP_BINARIES ; do
  268. strip_binary strip $bin
  269. done
  270.  
  271. - STRIP_BINARIES=`find $INSTALLDIR_NATIVE/lib/gcc/arm-none-eabi/$GCC_VER/ -maxdepth 1 -name \* -perm +111 -and ! -type d`
  272. + STRIP_BINARIES=`find $INSTALLDIR_NATIVE/lib/gcc/armeb-none-eabi/$GCC_VER/ -maxdepth 1 -name \* -perm +111 -and ! -type d`
  273. for bin in $STRIP_BINARIES ; do
  274. strip_binary strip $bin
  275. done
  276. @@ -610,24 +611,24 @@ fi
  277. echo Task [III-10] /$HOST_NATIVE/strip_target_objects/
  278. saveenv
  279. prepend_path PATH $INSTALLDIR_NATIVE/bin
  280. -TARGET_LIBRARIES=`find $INSTALLDIR_NATIVE/arm-none-eabi/lib -name \*.a`
  281. +TARGET_LIBRARIES=`find $INSTALLDIR_NATIVE/armeb-none-eabi/lib -name \*.a`
  282. for target_lib in $TARGET_LIBRARIES ; do
  283. - arm-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_lib || true
  284. + armeb-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_lib || true
  285. done
  286.  
  287. -TARGET_OBJECTS=`find $INSTALLDIR_NATIVE/arm-none-eabi/lib -name \*.o`
  288. +TARGET_OBJECTS=`find $INSTALLDIR_NATIVE/armeb-none-eabi/lib -name \*.o`
  289. for target_obj in $TARGET_OBJECTS ; do
  290. - arm-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_obj || true
  291. + armeb-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_obj || true
  292. done
  293.  
  294. -TARGET_LIBRARIES=`find $INSTALLDIR_NATIVE/lib/gcc/arm-none-eabi/$GCC_VER -name \*.a`
  295. +TARGET_LIBRARIES=`find $INSTALLDIR_NATIVE/lib/gcc/armeb-none-eabi/$GCC_VER -name \*.a`
  296. for target_lib in $TARGET_LIBRARIES ; do
  297. - arm-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_lib || true
  298. + armeb-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_lib || true
  299. done
  300.  
  301. -TARGET_OBJECTS=`find $INSTALLDIR_NATIVE/lib/gcc/arm-none-eabi/$GCC_VER -name \*.o`
  302. +TARGET_OBJECTS=`find $INSTALLDIR_NATIVE/lib/gcc/armeb-none-eabi/$GCC_VER -name \*.o`
  303. for target_obj in $TARGET_OBJECTS ; do
  304. - arm-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_obj || true
  305. + armeb-none-eabi-objcopy -R .comment -R .note -R .debug_info -R .debug_aranges -R .debug_pubnames -R .debug_pubtypes -R .debug_abbrev -R .debug_line -R .debug_str -R .debug_ranges -R .debug_loc $target_obj || true
  306. done
  307. restoreenv
  308.  
  309. @@ -643,14 +644,14 @@ rm -f $INSTALL_PACKAGE_NAME
  310. cp $ROOT/$RELEASE_FILE $INSTALLDIR_NATIVE_DOC/
  311. cp $ROOT/$README_FILE $INSTALLDIR_NATIVE_DOC/
  312. cp $ROOT/$LICENSE_FILE $INSTALLDIR_NATIVE_DOC/
  313. -copy_dir_clean $SRCDIR/$SAMPLES $INSTALLDIR_NATIVE/share/gcc-arm-none-eabi/$SAMPLES
  314. +copy_dir_clean $SRCDIR/$SAMPLES $INSTALLDIR_NATIVE/share/gcc-armeb-none-eabi/$SAMPLES
  315. ln -s $INSTALLDIR_NATIVE $INSTALL_PACKAGE_NAME
  316. ${TAR} cjf $PACKAGEDIR/$PACKAGE_NAME_NATIVE.tar.bz2 \
  317. --owner=0 \
  318. --group=0 \
  319. --exclude=host-$HOST_NATIVE \
  320. --exclude=host-$HOST_MINGW \
  321. - $INSTALL_PACKAGE_NAME/arm-none-eabi \
  322. + $INSTALL_PACKAGE_NAME/armeb-none-eabi \
  323. $INSTALL_PACKAGE_NAME/bin \
  324. $INSTALL_PACKAGE_NAME/lib \
  325. $INSTALL_PACKAGE_NAME/share
  326. @@ -695,7 +696,7 @@ $SRCDIR/$BINUTILS/configure --build=$BUILD \
  327. --pdfdir=$INSTALLDIR_MINGW_DOC/pdf \
  328. --disable-nls \
  329. --enable-plugins \
  330. - --with-sysroot=$INSTALLDIR_MINGW/arm-none-eabi \
  331. + --with-sysroot=$INSTALLDIR_MINGW/armeb-none-eabi \
  332. "--with-pkgversion=$PKGVERSION"
  333.  
  334. if [ "x$DEBUG_BUILD_OPTIONS" != "x" ] ; then
  335. @@ -719,13 +720,13 @@ popd
  336.  
  337. echo Task [IV-2] /$HOST_MINGW/copy_libs/
  338. if [ "x$skip_manual" != "xyes" ]; then
  339. -copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/share/doc/gcc-arm-none-eabi/html $INSTALLDIR_MINGW_DOC/html
  340. -copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/share/doc/gcc-arm-none-eabi/pdf $INSTALLDIR_MINGW_DOC/pdf
  341. +copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/share/doc/gcc-armeb-none-eabi/html $INSTALLDIR_MINGW_DOC/html
  342. +copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/share/doc/gcc-armeb-none-eabi/pdf $INSTALLDIR_MINGW_DOC/pdf
  343. fi
  344. -copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/arm-none-eabi/lib $INSTALLDIR_MINGW/arm-none-eabi/lib
  345. -copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/arm-none-eabi/include $INSTALLDIR_MINGW/arm-none-eabi/include
  346. -copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/arm-none-eabi/include/c++ $INSTALLDIR_MINGW/arm-none-eabi/include/c++
  347. -copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/lib/gcc/arm-none-eabi $INSTALLDIR_MINGW/lib/gcc/arm-none-eabi
  348. +copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/armeb-none-eabi/lib $INSTALLDIR_MINGW/armeb-none-eabi/lib
  349. +copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/armeb-none-eabi/include $INSTALLDIR_MINGW/armeb-none-eabi/include
  350. +copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/armeb-none-eabi/include/c++ $INSTALLDIR_MINGW/armeb-none-eabi/include/c++
  351. +copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/lib/gcc/armeb-none-eabi $INSTALLDIR_MINGW/lib/gcc/armeb-none-eabi
  352.  
  353. echo Task [IV-3] /$HOST_MINGW/gcc-final/
  354. saveenv
  355. @@ -737,7 +738,7 @@ saveenvvar CC_FOR_TARGET $TARGET-gcc
  356. saveenvvar GCC_FOR_TARGET $TARGET-gcc
  357. saveenvvar CXX_FOR_TARGET $TARGET-g++
  358.  
  359. -pushd $INSTALLDIR_MINGW/arm-none-eabi/
  360. +pushd $INSTALLDIR_MINGW/armeb-none-eabi/
  361. rm -f usr
  362. ln -s . usr
  363. popd
  364. @@ -767,8 +768,8 @@ $SRCDIR/$GCC/configure --build=$BUILD --host=$HOST_MINGW --target=$TARGET \
  365. --with-gnu-ld \
  366. --with-headers=yes \
  367. --with-newlib \
  368. - --with-python-dir=share/gcc-arm-none-eabi \
  369. - --with-sysroot=$INSTALLDIR_MINGW/arm-none-eabi \
  370. + --with-python-dir=share/gcc-armeb-none-eabi \
  371. + --with-sysroot=$INSTALLDIR_MINGW/armeb-none-eabi \
  372. --with-libiconv-prefix=$BUILDDIR_MINGW/host-libs/usr \
  373. --with-gmp=$BUILDDIR_MINGW/host-libs/usr \
  374. --with-mpfr=$BUILDDIR_MINGW/host-libs/usr \
  375. @@ -794,13 +795,13 @@ fi
  376. popd
  377.  
  378. pushd $INSTALLDIR_MINGW
  379. -rm -rf bin/arm-none-eabi-gccbug
  380. +rm -rf bin/armeb-none-eabi-gccbug
  381. rm -rf include
  382. popd
  383.  
  384. -copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/lib/gcc/arm-none-eabi $INSTALLDIR_MINGW/lib/gcc/arm-none-eabi
  385. -rm -rf $INSTALLDIR_MINGW/arm-none-eabi/usr
  386. -rm -rf $INSTALLDIR_MINGW/lib/gcc/arm-none-eabi/*/plugin
  387. +copy_dir $BUILDDIR_MINGW/tools-$OBJ_SUFFIX_NATIVE/lib/gcc/armeb-none-eabi $INSTALLDIR_MINGW/lib/gcc/armeb-none-eabi
  388. +rm -rf $INSTALLDIR_MINGW/armeb-none-eabi/usr
  389. +rm -rf $INSTALLDIR_MINGW/lib/gcc/armeb-none-eabi/*/plugin
  390. find $INSTALLDIR_MINGW -executable -and -not -type d -and -not -name \*.exe \
  391. -and -not -name liblto_plugin-0.dll -exec rm -f \{\} \;
  392. restoreenv
  393. @@ -833,8 +834,8 @@ build_mingw_gdb()
  394. $MINGW_GDB_CONF_OPTS \
  395. --with-libexpat=$BUILDDIR_MINGW/host-libs/usr \
  396. --with-libiconv-prefix=$BUILDDIR_MINGW/host-libs/usr \
  397. - --with-system-gdbinit=$INSTALLDIR_MINGW/$HOST_MINGW/arm-none-eabi/lib/gdbinit \
  398. - '--with-gdb-datadir='\''${prefix}'\''/arm-none-eabi/share/gdb' \
  399. + --with-system-gdbinit=$INSTALLDIR_MINGW/$HOST_MINGW/armeb-none-eabi/lib/gdbinit \
  400. + '--with-gdb-datadir='\''${prefix}'\''/armeb-none-eabi/share/gdb' \
  401. "--with-pkgversion=$PKGVERSION"
  402.  
  403. if [ "x$DEBUG_BUILD_OPTIONS" != "x" ] ; then
  404. @@ -867,18 +868,18 @@ rm -rf $INSTALLDIR_MINGW_DOC/man
  405. find $INSTALLDIR_MINGW -name '*.la' -exec rm '{}' ';'
  406.  
  407. echo Task [IV-6] /$HOST_MINGW/strip_host_objects/
  408. -STRIP_BINARIES=`find $INSTALLDIR_MINGW/bin/ -name arm-none-eabi-\*.exe`
  409. +STRIP_BINARIES=`find $INSTALLDIR_MINGW/bin/ -name armeb-none-eabi-\*.exe`
  410. if [ "x$DEBUG_BUILD_OPTIONS" = "x" ] ; then
  411. for bin in $STRIP_BINARIES ; do
  412. strip_binary $HOST_MINGW_TOOL-strip $bin
  413. done
  414.  
  415. - STRIP_BINARIES=`find $INSTALLDIR_MINGW/arm-none-eabi/bin/ -maxdepth 1 -mindepth 1 -name \*.exe`
  416. + STRIP_BINARIES=`find $INSTALLDIR_MINGW/armeb-none-eabi/bin/ -maxdepth 1 -mindepth 1 -name \*.exe`
  417. for bin in $STRIP_BINARIES ; do
  418. strip_binary $HOST_MINGW_TOOL-strip $bin
  419. done
  420.  
  421. - STRIP_BINARIES=`find $INSTALLDIR_MINGW/lib/gcc/arm-none-eabi/$GCC_VER/ -name \*.exe`
  422. + STRIP_BINARIES=`find $INSTALLDIR_MINGW/lib/gcc/armeb-none-eabi/$GCC_VER/ -name \*.exe`
  423. for bin in $STRIP_BINARIES ; do
  424. strip_binary $HOST_MINGW_TOOL-strip $bin
  425. done
  426. @@ -891,11 +892,11 @@ rm -f $INSTALL_PACKAGE_NAME
  427. cp $ROOT/$RELEASE_FILE $INSTALLDIR_MINGW_DOC/
  428. cp $ROOT/$README_FILE $INSTALLDIR_MINGW_DOC/
  429. cp $ROOT/$LICENSE_FILE $INSTALLDIR_MINGW_DOC/
  430. -copy_dir_clean $SRCDIR/$SAMPLES $INSTALLDIR_MINGW/share/gcc-arm-none-eabi/$SAMPLES
  431. +copy_dir_clean $SRCDIR/$SAMPLES $INSTALLDIR_MINGW/share/gcc-armeb-none-eabi/$SAMPLES
  432. flip -m $INSTALLDIR_MINGW_DOC/$RELEASE_FILE
  433. flip -m $INSTALLDIR_MINGW_DOC/$README_FILE
  434. flip -m -b $INSTALLDIR_MINGW_DOC/$LICENSE_FILE
  435. -flip -m $INSTALLDIR_MINGW/share/gcc-arm-none-eabi/$SAMPLES_DOS_FILES
  436. +flip -m $INSTALLDIR_MINGW/share/gcc-armeb-none-eabi/$SAMPLES_DOS_FILES
  437. rm -rf $INSTALLDIR_MINGW/include
  438. ln -s $INSTALLDIR_MINGW $INSTALL_PACKAGE_NAME
  439.  
  440. @@ -912,7 +913,7 @@ makensis -DBaseDir=$INSTALLDIR_MINGW \
  441. -DInstallDirBase="$INSTALLBASE" \
  442. -DInstallDirVer="$GCC_VER_SHORT $RELEASEVER" \
  443. "-XOutFile $SRCDIR/$INSTALLATION/output/$PACKAGE_NAME_MINGW.exe" \
  444. - $SRCDIR/$INSTALLATION/arm-none-eabi-gnu-tools.nsi
  445. + $SRCDIR/$INSTALLATION/armeb-none-eabi-gnu-tools.nsi
  446.  
  447. cp -rf $SRCDIR/$INSTALLATION/output/$PACKAGE_NAME_MINGW.exe $PACKAGEDIR/
  448. rm -f $INSTALL_PACKAGE_NAME
  449. --
  450. 2.6.2
  451.  
  452.  
  453. From 1d78d4dda12f90e0276ea0fbf33eaa4a22aa7ffd Mon Sep 17 00:00:00 2001
  454. From: "tdos.apone" <toemossgarcia@gmail.com>
  455. Date: Thu, 10 Dec 2015 12:54:50 -0600
  456. Subject: [PATCH 3/3] gcc multilib patches
  457.  
  458. ---
  459. src/gcc/gcc/config/arm/t-rmprofile | 20 ++++++++++++++++++++
  460. 1 file changed, 20 insertions(+)
  461.  
  462. diff --git a/src/gcc/gcc/config/arm/t-rmprofile b/src/gcc/gcc/config/arm/t-rmprofile
  463. index 3939461..2dbce10 100644
  464. --- a/src/gcc/gcc/config/arm/t-rmprofile
  465. +++ b/src/gcc/gcc/config/arm/t-rmprofile
  466. @@ -15,6 +15,11 @@ MULTILIB_DIRNAMES += softfp fpu
  467. MULTILIB_OPTIONS += mfpu=fpv4-sp-d16/mfpu=vfpv3-d16/mfpu=fpv5-sp-d16/mfpu=fpv5-d16
  468. MULTILIB_DIRNAMES += fpv4-sp-d16 vfpv3-d16 fpv5-sp-d16 fpv5-d16
  469.  
  470. +
  471. +MULTILIB_OPTIONS += mbig-endian
  472. +MULTILIB_DIRNAMES += big-endian
  473. +
  474. +
  475. MULTILIB_MATCHES = march?armv6s-m=mcpu?cortex-m0
  476. MULTILIB_MATCHES += march?armv6s-m=mcpu?cortex-m0plus
  477. MULTILIB_MATCHES += march?armv6s-m=mcpu?cortex-m1
  478. @@ -90,10 +95,25 @@ ifneq (,$(filter armv7 armv7-r armv7-a,$(subst $(comma),$(space),$(with_multilib
  479. MULTILIB_REQUIRED += mthumb/march=armv7
  480. MULTILIB_REQUIRED += mthumb/march=armv7/mfloat-abi=softfp/mfpu=vfpv3-d16
  481. MULTILIB_REQUIRED += mthumb/march=armv7/mfloat-abi=hard/mfpu=vfpv3-d16
  482. +
  483. +MULTILIB_REQUIRED += mthumb/march=armv7/mbig-endian
  484. +MULTILIB_REQUIRED += mthumb/march=armv7/mfloat-abi=softfp/mfpu=vfpv3-d16/mbig-endian
  485. +MULTILIB_REQUIRED += mthumb/march=armv7/mfloat-abi=hard/mfpu=vfpv3-d16/mbig-endian
  486. +
  487. MULTILIB_OSDIRNAMES += mthumb/march.armv7=!armv7-ar/thumb
  488. MULTILIB_OSDIRNAMES += mthumb/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16=!armv7-ar/thumb/fpu
  489. MULTILIB_OSDIRNAMES += mthumb/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16=!armv7-ar/thumb/softfp
  490. +
  491. +MULTILIB_OSDIRNAMES += mthumb/march.armv7/mbig-endian=!armv7-ar-bigE/thumb
  492. +MULTILIB_OSDIRNAMES += mthumb/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16/mbig-endian=!armv7-ar-bigE/thumb/fpu
  493. +MULTILIB_OSDIRNAMES += mthumb/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16/mbig-endian=!armv7-ar-bigE/thumb/softfp
  494. +
  495. MULTILIB_REUSE += mthumb/march.armv7=marm/march.armv7
  496. MULTILIB_REUSE += mthumb/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16=marm/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16
  497. MULTILIB_REUSE += mthumb/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16=marm/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16
  498. +
  499. +MULTILIB_REUSE += mthumb/march.armv7/mbig-endian=marm/march.armv7/mbig-endian
  500. +MULTILIB_REUSE += mthumb/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16/mbig-endian=marm/march.armv7/mfloat-abi.softfp/mfpu.vfpv3-d16/mbig-endian
  501. +MULTILIB_REUSE += mthumb/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16/mbig-endian=marm/march.armv7/mfloat-abi.hard/mfpu.vfpv3-d16/mbig-endian
  502. +
  503. endif
  504. --
  505. 2.6.2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement