Compare commits

...

84 Commits

Author SHA1 Message Date
Dave Murphy
ca6674a81d update libnds and default arm7 versions. Enable script for release 2015-12-13 00:15:32 +00:00
Dave Murphy
cf2e5124ce strip unused sections at link time 2015-12-12 11:38:41 +00:00
Dave Murphy
c4a55871e4 size improvements for libstdc++ 2015-12-12 11:37:57 +00:00
Dave Murphy
67f27e6455 update 3dslink 2015-12-11 21:11:21 +00:00
Dave Murphy
ff6e2b58c6 update to gcc 5.3.0 2015-12-11 21:11:01 +00:00
Dave Murphy
50514b3c7f don't fail on writes to null device 2015-12-11 09:53:31 +00:00
Dave Murphy
5e86d85526 fix chdir when no device string set 2015-11-29 18:37:59 +00:00
Dave Murphy
f8998e03ce update binutils to 2.25.1 2015-11-29 18:37:05 +00:00
Dave Murphy
af4c3ff66a update binutils to 2.25.1 2015-11-29 18:36:39 +00:00
Dave Murphy
0ca5bf65c0 remove default crt0 2015-11-28 22:27:09 +00:00
Dave Murphy
564fa0e0af Merge branch 'devkitARM_r45' of github.com:devkitPro/buildscripts into devkitARM_r45 2015-11-28 22:25:04 +00:00
Dave Murphy
47ddd93e55 add support for TLS 2015-11-28 18:24:01 +00:00
Dave Murphy
fea87e834c allow override of CTRULIB variable 2015-11-28 18:03:29 +00:00
Dave Murphy
bb1c5bba94 garbage collect sections when linking 2015-11-23 20:11:37 +00:00
Dave Murphy
0e404ac683 use lto aware tools 2015-11-23 20:10:50 +00:00
Dave Murphy
dd0500e539 tidying libsysbase and implementing locks 2015-11-22 16:45:08 +00:00
Dave Murphy
46989bb607 grit update 2015-11-21 13:52:21 +00:00
Dave Murphy
827f20a398 update 3dstools 2015-11-14 00:25:17 +00:00
Dave Murphy
e4270dc3d2 use latest libctru 2015-11-03 20:57:07 +00:00
Dave Murphy
ac72c96c00 fix freeimage dll path 2015-11-01 02:01:08 +00:00
Dave Murphy
83fb7448d8 use latest 3dstools & latest picasso 2015-10-30 22:21:51 +00:00
Dave Murphy
6e94598966 update to gdb 7.10 2015-10-30 22:21:04 +00:00
Dave Murphy
14359b772f update to gcc 5.2.0 2015-10-25 15:28:45 +00:00
Dave Murphy
1f4243ead0 upgrade to gcc 5.1.0 2015-05-22 11:13:51 +01:00
Dave Murphy
207d78ae00 update 3dstools 2015-03-17 22:41:47 +00:00
Dave Murphy
9362ca7bac add picasso to provided tools 2015-03-17 16:49:09 +00:00
Dave Murphy
f6d47b4005 update libctru 2015-03-17 10:47:58 +00:00
Dave Murphy
c384a5097c prepping devkitARM r45 2015-03-16 18:12:42 +00:00
Dave Murphy
074ceec36c update gdb patch 2015-03-16 18:05:19 +00:00
Dave Murphy
e0c31cded7 update to gdb 7.9 2015-03-16 17:01:42 +00:00
Dave Murphy
fdc132d773 disable git scripts 2015-02-16 00:55:24 +00:00
Dave Murphy
cb1caec39b enable scripts for release 2015-02-16 00:53:58 +00:00
Dave Murphy
35fe7968da update to latest ds libraries 2015-02-16 00:53:00 +00:00
Dave Murphy
c1cca846a3 use latest libctru 2015-02-15 16:26:09 +00:00
Dave Murphy
5b64b79621 fix OSX building of gcc 2015-02-14 21:28:58 +00:00
Dave Murphy
598983a38a add 3dslink 2015-02-14 21:28:31 +00:00
Dave Murphy
e88c516694 temp removal of lock.h overrides 2015-02-13 23:34:41 +00:00
Dave Murphy
d3505fdf69 update ndstool 2015-02-13 23:34:05 +00:00
Dave Murphy
62b2adce92 implement dup/dup2 2015-01-27 23:41:06 +00:00
Dave Murphy
4fbb8b8b54 update dstools version 2015-01-22 21:24:33 +00:00
Dave Murphy
9fb5310f7d update dfu-util version 2015-01-21 22:26:20 +00:00
Dave Murphy
2a8f1980d8 changed install location 2015-01-21 18:32:38 +00:00
Dave Murphy
0b9a5d7f76 update to gdb 7.8.2 2015-01-21 17:24:24 +00:00
Dave Murphy
bfdab38a67 read direct to user buffer when request is greater than internal buffer size 2015-01-21 15:51:42 +00:00
Dave Murphy
802007e17f updated ndstool 2015-01-07 15:14:26 +00:00
Dave Murphy
7f5147f4ec update to binutils 2.25 2015-01-07 15:13:29 +00:00
Dave Murphy
2e2905ee72 update libgba for latest tools 2015-01-06 16:48:01 +00:00
Dave Murphy
08f90d3343 allow different portlibs per console 2015-01-05 14:06:06 +00:00
Dave Murphy
59cbc65a94 latest 3dstools version 2015-01-05 13:00:04 +00:00
Dave Murphy
3d49b7287a Merge branch 'master' into devkitARM_r44 2015-01-01 22:19:48 +00:00
Dave Murphy
5305d2e77e always set shell to bash on OSX 2015-01-01 22:09:08 +00:00
Dave Murphy
742742f275 set portlibs base path in base rules, add individual portlibs for each console 2015-01-01 22:08:39 +00:00
Dave Murphy
c3248e2ed5 remove previous newlib patch 2014-12-31 18:43:03 +00:00
Dave Murphy
9a1e7dfb06 newlib 2.2.0 for devkitARM 2014-12-31 17:59:33 +00:00
Dave Murphy
bb4be681cb reinstate gp32 tools 2014-12-31 17:23:46 +00:00
Dave Murphy
c6f7acb7eb mark config.sh.sample as executable 2014-12-31 17:22:45 +00:00
Dave Murphy
939f373da5 update for latest tools 2014-12-22 15:03:33 +00:00
Dave Murphy
84d9590a9c reinstate gp32 tools 2014-12-22 12:36:38 +00:00
Dave Murphy
b28d86537e mark config.sh.sample as executable 2014-12-22 12:36:10 +00:00
Dave Murphy
dab44c9fe2 Merge branch 'master' into devkitARM_r44 2014-12-21 15:44:10 +00:00
Dave Murphy
94f707c93e elf2dol, gcdspsuite & gxtexconv merged into gamecube-tools package 2014-12-21 15:43:28 +00:00
Dave Murphy
5522eb47bc new dstools version 2014-12-18 16:58:28 +00:00
Dave Murphy
ad68b25d09 expose handle manager calls and gethostid 2014-12-17 23:28:44 +00:00
Dave Murphy
ff7a467958 tidy up libsysbase
add rmdir
set errno appropriately
getcwd(NULL,0) now allocates buffer
2014-12-10 22:14:09 +00:00
Dave Murphy
a31587e78a remove unreferenced BUILD_DKPRO_DOWNLOAD var 2014-12-06 15:25:50 +00:00
Dave Murphy
f846fe610b add __DYNAMIC_REENT__, use constructor/destructor to init/close lock, add __getreent syscall callback 2014-12-06 04:48:41 +00:00
Dave Murphy
47e4fcbee5 enable-threads 2014-12-06 04:16:27 +00:00
Dave Murphy
7a6994a1c7 update 3dstools version 2014-12-03 11:44:54 +00:00
Dave Murphy
fdd2a20b33 add gettimeofday callback, add locks to handle manager 2014-12-03 11:33:46 +00:00
fincs
7546e1e65a Update for new 3dsxtool 2014-11-30 21:38:04 +01:00
Dave Murphy
c2be5b3865 keep compatibility with previous devkitARM 2014-11-30 06:46:03 +00:00
Dave Murphy
18b81c32e8 fix missing _rename_r 2014-11-28 23:13:00 +00:00
Dave Murphy
9c53de7304 correct multilib setup 2014-11-28 23:11:50 +00:00
Dave Murphy
be191f464a put 3ds crt0 only in armv6k/fpu multilib 2014-11-28 21:48:03 +00:00
Dave Murphy
466748e63c update devkitARM release number 2014-11-27 10:26:42 +00:00
Dave Murphy
213b8b293d update newlib with lock stub support 2014-11-27 10:26:11 +00:00
Dave Murphy
63fc9bb5e5 add armv6k hard float multilib 2014-11-27 10:21:57 +00:00
Dave Murphy
fe1d504432 update gdb to 7.8 2014-11-27 10:21:18 +00:00
Dave Murphy
970e965ba5 add instructions for getting GL/gl.h 2014-11-27 10:10:54 +00:00
Dave Murphy
192c28db55 check for already extracted host archives before extracting 2014-11-22 16:34:38 +00:00
Dave Murphy
c4ab14acb2 update 3dstools version 2014-11-22 16:33:38 +00:00
Dave Murphy
334b3ab083 use name of dir to report errors instead of archive name 2014-11-22 16:31:23 +00:00
Dave Murphy
958eb2bae6 disable repo script 2014-11-21 18:02:31 +00:00
Dave Murphy
30c83ed3d0 update libnds, libfat and default arm7 versions. Enable script for release 2014-11-21 17:59:15 +00:00
31 changed files with 8136 additions and 20581 deletions

View File

@@ -1,52 +1,65 @@
devkitPro build scripts devkitPro build scripts
-------------------------- --------------------------
This readme will guide you through building devkitARM, devkitPPC or devkitPSP from source using a set of scripts. This readme will guide you through building devkitARM, devkitPPC or devkitPSP
from source using a set of scripts.
The windows versions of the toolchains are now cross compiled on linux using
mingw-w64
Preparing to build
--------------------------
The windows versions of the toolchains are now cross compiled on linux using mingw-w64
required packages for building on debian/*buntu required packages for building on debian/*buntu
sudo apt-get install build-essential autoconf automake bison flex libncurses5-dev libreadline-dev texinfo pkg-config sudo apt-get install build-essential autoconf automake bison flex libncurses5-dev
libreadline-dev texinfo pkg-config
For building gcc libgmp, libmpfr and libmpc are required - these are built as static libraries to make packaging simpler. For building gcc libgmp, libmpfr and libmpc are required - these are built as
If you're building the tools for personal use then the versions packaged by your chosen distro should suffice. static libraries to make packaging simpler. If you're building the tools for
personal use then the versions packaged by your chosen distro should suffice.
http://gmplib.org/ http://gmplib.org/
http://www.mpfr.org/ http://www.mpfr.org/
http://www.multiprecision.org/ http://www.multiprecision.org/
Some of the tools for devkitARM and devkitPPC also require FreeImage, zlib, and libusb. Again these are built as static Some of the tools for devkitARM and devkitPPC also require FreeImage, zlib,
libraries for ease of packaging but you can probably use the versions supplied by your distro. and libusb. Again these are built as static libraries for ease of packaging
but you can probably use the versions supplied by your distro.
http://freeimage.sourceforge.net/ http://freeimage.sourceforge.net/
http://www.zlib.net http://www.zlib.net
http://www.libusb.org http://www.libusb.org
Building gxtexconv for cube/wii needs GL/gl.h which can be obtained with
Downloading the source packages sudo apt-get install mesa-common-dev
-------------------------------
When you run the build script it will ask you to choose from one of two options, one for if you have already downloaded the source packages and another for if you want it to download them for you (using wget or curl). To avoid having to manually answer prompts during the build the script will
read variables from config.sh if it exists. Copy config.sh.sample to config.sh
and set the variables as appropriate for your build.
The script will download the source packages it needs. These will be downloaded
to the script directory by default but you can set BUILD_DKPRO_SRCDIR if you want
to put them somewhere else. When its finished you have the option to delete
all temporary files, sources and their source packages.
The top level shell script has now been unified and offers the option of devkitARM, devkitPPC or devkitPSP.
Building the devkits Building the devkits
-------------------- --------------------
Simply run the "build-devkit.sh" script in the same directory as this text file as shown below, then follow the prompts; Simply run the "build-devkit.sh" script in the same directory as this text file
as shown below, then follow the prompts;
./build-devkit.sh ./build-devkit.sh
Once the script finds the source packages they will be decompressed and the build process will begin. When its finished you have the option to delete all temporary files, sources and their source packages. Several examples tarballs are provided for the platforms supported by devkitARM &
devkitPPC, these include basic templates for starting your own projects.
To avoid having to manually answer prompts during the build the script will read variables from config.sh if it exists. Copy config.sh.sample to config.sh and set the variables as appropriate for your build. See http://wiki.devkitpro.org/index.php/Getting_Started for links.
Several examples tarballs are provided for the platforms supported by devkitARM & devkitPPC, these include basic templates for starting your own projects. See http://wiki.devkitpro.org/index.php/Getting_Started for links.
Using devkitARM Using devkitARM
--------------- ---------------
to use the built in crt0 and linkscript use arm-eabi-gcc to link your project to use the built in crt0 and linkscript use arm-none-eabi-gcc to link your project
Several specs files are built in for the various platforms Several specs files are built in for the various platforms
@@ -58,25 +71,31 @@ Several specs files are built in for the various platforms
-specs=ds_cart for a DS arm7 binary which runs from GBA cart. -specs=ds_cart for a DS arm7 binary which runs from GBA cart.
-specs=gp32.specs for standard GP32 app. -specs=gp32.specs for standard GP32 app.
-specs=gp32_gpsdk.specs for official gamepark SDK GP32 app. -specs=gp32_gpsdk.specs for official gamepark SDK GP32 app.
-specs=3dsx.specs for a 3DS homebrew binary.
Using devkitPPC Using devkitPPC
--------------- ---------------
to use the built in crt0 and linkscript use powerpc-gekko-gcc to link your project, using the command line switch -mgcn for a bare bones system, -mogc to use libogc and the multi-threaded microkernel for gamecube, -mrvl for wii. to use the built in crt0 and linkscript use powerpc-eabi-gcc to link your project,
using the command line switch -mgcn for a bare bones system, -mogc to use libogc and
the multi-threaded microkernel for gamecube, -mrvl for wii.
Using devkitPSP Using devkitPSP
--------------- ---------------
All you need to do now to use devkitPSP is make sure that your freshly built tools are in your PATH, something like this; All you need to do now to use devkitPSP is make sure that your freshly built tools
are in your PATH, something like this;
export PATH=$PATH:<path to devkitPSP>/bin export PATH=$PATH:<path to devkitPSP>/bin
(Obviously replace <path to devkitPSP> with the full path to the devkitPSP installation directory) (Obviously replace <path to devkitPSP> with the full path to the devkitPSP
installation directory)
Getting started Getting started
--------------- ---------------
The best thing to do next is test the compiler, so grab an examples tarball from sourceforge & run make in the top level. The best thing to do next is test the compiler, so grab an examples tarball
from sourceforge & run make in the top level.
Credits Credits
------- -------
@@ -84,6 +103,7 @@ Credits
* Thanks to WinterMute for bringing us devkitPro, the website is http://www.devkitpro.org * Thanks to WinterMute for bringing us devkitPro, the website is http://www.devkitpro.org
* Build scripts written by WinterMute and tied together by GreenGianT * Build scripts written by WinterMute and tied together by GreenGianT
* Thanks to Mr Spiv, Honkey Kong, Raleigh and JoostP for OS X testing * Thanks to Mr Spiv, Honkey Kong, Raleigh and JoostP for OS X testing
* libctru by Smealum, YellowS8, fincs, mtheall & WinterMute with contributions from many others.
* libogc written and supplied by Shagkur. Additional code by WinterMute, Bushing, Marcan & Tybor * libogc written and supplied by Shagkur. Additional code by WinterMute, Bushing, Marcan & Tybor
* libgba by WinterMute * libgba by WinterMute
* libnds by Joat, Dovoto and WinterMute with contributions from many others. * libnds by Joat, Dovoto and WinterMute with contributions from many others.

View File

@@ -1,12 +1,12 @@
#!/bin/bash #!/bin/bash
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Build scripts for # Build scripts for
# devkitARM release 43 # devkitARM release 45
# devkitPPC release 27 # devkitPPC release 27
# devkitPSP release 17 # devkitPSP release 17
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
if [ 1 -eq 1 ] ; then if [ 0 -eq 1 ] ; then
echo "Currently in release cycle, proceed with caution, do not report problems, do not ask for support." echo "Currently in release cycle, proceed with caution, do not report problems, do not ask for support."
echo "Please use the latest release buildscripts unless advised otherwise by devkitPro staff." echo "Please use the latest release buildscripts unless advised otherwise by devkitPro staff."
echo "http://sourceforge.net/projects/devkitpro/files/buildscripts/" echo "http://sourceforge.net/projects/devkitpro/files/buildscripts/"
@@ -25,30 +25,31 @@ echo "https://sourceforge.net/tracker/?group_id=114505&atid=668553"
echo echo
LIBOGC_VER=1.8.12 LIBOGC_VER=1.8.12
LIBGBA_VER=20090222 LIBGBA_VER=20150106
LIBNDS_VER=1.5.8 LIBNDS_VER=1.5.12
LIBCTRU_VER=0.1.0 LIBCTRU_VER=0.6.0
DEFAULT_ARM7_VER=0.5.24 DEFAULT_ARM7_VER=0.6.0
DSWIFI_VER=0.3.16 DSWIFI_VER=0.3.17
LIBMIRKO_VER=0.9.7 LIBMIRKO_VER=0.9.7
MAXMOD_VER=1.0.9 MAXMOD_VER=1.0.9
FILESYSTEM_VER=0.9.11 FILESYSTEM_VER=0.9.12
LIBFAT_VER=1.0.12 LIBFAT_VER=1.0.14
PSPSDK_VER=20120404 PSPSDK_VER=20120404
GBATOOLS_VER=1.0.0 GBATOOLS_VER=1.0.0
DSTOOLS_VER=1.0.0 DSTOOLS_VER=1.0.2
GRIT_VER=0.8.12 GP32_TOOLS_VER=1.0.1
NDSTOOL_VER=1.50.1 GRIT_VER=0.8.13
NDSTOOL_VER=1.50.3
GENERAL_TOOLS_VER=1.0.0 GENERAL_TOOLS_VER=1.0.0
DLDITOOL_VER=1.24.0 DLDITOOL_VER=1.24.0
GXTEXCONV_VER=0.1.9 GAMECUBE_TOOLS_VER=1.0.0
GCDSPSUITE_VER=1.4.0
ELF2DOL_VER=1.0.0
WIILOAD_VER=0.5.1 WIILOAD_VER=0.5.1
MMUTIL_VER=1.8.6 MMUTIL_VER=1.8.6
DFU_UTIL_VER=0.7.1 DFU_UTIL_VER=0.8.1
STLINK_VER=0.5.8 STLINK_VER=0.5.8
TOOLS3DS_VER=1.0.0 TOOLS3DS_VER=1.1.1
LINK3DS_VER=0.5.1
PICASSO_VER=2.1.0
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
function extract_and_patch { function extract_and_patch {
@@ -92,7 +93,7 @@ unset LDFLAGS
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Look for automated configuration file to bypass prompts # Look for automated configuration file to bypass prompts
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
echo -n "Looking for configuration file... " echo -n "Looking for configuration file... "
if [ -f ./config.sh ]; then if [ -f ./config.sh ]; then
echo "Found." echo "Found."
@@ -194,23 +195,30 @@ scriptdir=$(pwd)/$basedir/scripts
archives="binutils-${BINUTILS_VER}.tar.bz2 gcc-${GCC_VER}.tar.bz2 newlib-${NEWLIB_VER}.tar.gz gdb-${GDB_VER}.tar.bz2" archives="binutils-${BINUTILS_VER}.tar.bz2 gcc-${GCC_VER}.tar.bz2 newlib-${NEWLIB_VER}.tar.gz gdb-${GDB_VER}.tar.bz2"
if [ $VERSION -eq 1 ]; then if [ $VERSION -eq 1 ]; then
targetarchives="libnds-src-${LIBNDS_VER}.tar.bz2 libgba-src-${LIBGBA_VER}.tar.bz2 targetarchives="libnds-src-${LIBNDS_VER}.tar.bz2 libgba-src-${LIBGBA_VER}.tar.bz2
libmirko-src-${LIBMIRKO_VER}.tar.bz2 dswifi-src-${DSWIFI_VER}.tar.bz2 maxmod-src-${MAXMOD_VER}.tar.bz2 libmirko-src-${LIBMIRKO_VER}.tar.bz2 dswifi-src-${DSWIFI_VER}.tar.bz2 maxmod-src-${MAXMOD_VER}.tar.bz2
default_arm7-src-${DEFAULT_ARM7_VER}.tar.bz2 libfilesystem-src-${FILESYSTEM_VER}.tar.bz2 default_arm7-src-${DEFAULT_ARM7_VER}.tar.bz2 libfilesystem-src-${FILESYSTEM_VER}.tar.bz2
libfat-src-${LIBFAT_VER}.tar.bz2 libctru-src-${LIBCTRU_VER}.tar.bz2" libfat-src-${LIBFAT_VER}.tar.bz2 libctru-src-${LIBCTRU_VER}.tar.bz2"
hostarchives="gbatools-$GBATOOLS_VER.tar.bz2 dstools-$DSTOOLS_VER.tar.bz2 grit-$GRIT_VER.tar.bz2 ndstool-$NDSTOOL_VER.tar.bz2
hostarchives="gbatools-$GBATOOLS_VER.tar.bz2 gp32tools-$GP32_TOOLS_VER.tar.bz2
dstools-$DSTOOLS_VER.tar.bz2 grit-$GRIT_VER.tar.bz2 ndstool-$NDSTOOL_VER.tar.bz2
general-tools-$GENERAL_TOOLS_VER.tar.bz2 dlditool-$DLDITOOL_VER.tar.bz2 mmutil-$MMUTIL_VER.tar.bz2 general-tools-$GENERAL_TOOLS_VER.tar.bz2 dlditool-$DLDITOOL_VER.tar.bz2 mmutil-$MMUTIL_VER.tar.bz2
dfu-util-$DFU_UTIL_VER.tar.bz2 stlink-$STLINK_VER.tar.bz2 3dstools-$TOOLS3DS_VER.tar.bz2" dfu-util-$DFU_UTIL_VER.tar.bz2 stlink-$STLINK_VER.tar.bz2 3dstools-$TOOLS3DS_VER.tar.bz2
picasso-$PICASSO_VER.tar.bz2 3dslink-$LINK3DS_VER.tar.bz2"
fi fi
if [ $VERSION -eq 2 ]; then if [ $VERSION -eq 2 ]; then
targetarchives="libogc-src-${LIBOGC_VER}.tar.bz2 libfat-src-${LIBFAT_VER}.tar.bz2" targetarchives="libogc-src-${LIBOGC_VER}.tar.bz2 libfat-src-${LIBFAT_VER}.tar.bz2"
hostarchives="gxtexconv-$GXTEXCONV_VER.tar.bz2 gcdspsuite-$GCDSPSUITE_VER.tar.bz2
wiiload-$WIILOAD_VER.tar.bz2 elf2dol-$ELF2DOL_VER.tar.bz2 general-tools-$GENERAL_TOOLS_VER.tar.bz2" hostarchives="gamecube-tools-$GAMECUBE_TOOLS_VER.tar.bz2 wiiload-$WIILOAD_VER.tar.bz2 general-tools-$GENERAL_TOOLS_VER.tar.bz2"
fi fi
if [ $VERSION -eq 3 ]; then if [ $VERSION -eq 3 ]; then
targetarchives="pspsdk-src-${PSPSDK_VER}.tar.bz2" targetarchives="pspsdk-src-${PSPSDK_VER}.tar.bz2"
fi fi
if [ ! -z "$BUILD_DKPRO_SRCDIR" ] ; then if [ ! -z "$BUILD_DKPRO_SRCDIR" ] ; then
@@ -250,7 +258,10 @@ done
for archive in $hostarchives for archive in $hostarchives
do do
tar -xjf "$SRCDIR/$archive" destdir=$(echo $archive | sed -e 's/\(.*\)-src-\(.*\)\.tar\.bz2/\1-\2/' )
if [ ! -d $destdir ]; then
tar -xjf "$SRCDIR/$archive"
fi
done done
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@@ -262,7 +273,7 @@ if [ -f $scriptdir/build-crtls.sh ]; then . $scriptdir/build-crtls.sh || { echo
if [ ! -z $CROSSBUILD ]; then if [ ! -z $CROSSBUILD ]; then
if [ $VERSION -ne 3 ]; then if [ $VERSION -ne 3 ]; then
cp -v $CROSSLIBPATH/FreeImage.dll $prefix/bin cp -v $CROSSBINPATH/FreeImage.dll $prefix/bin
fi fi
if [ $VERSION -eq 1 ]; then if [ $VERSION -eq 1 ]; then
cp -v $CROSSBINPATH/libusb-1.0.dll $prefix/bin cp -v $CROSSBINPATH/libusb-1.0.dll $prefix/bin

13
config.sh.sample Normal file → Executable file
View File

@@ -13,15 +13,6 @@
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
BUILD_DKPRO_PACKAGE=0 BUILD_DKPRO_PACKAGE=0
#---------------------------------------------------------------------------------
# Download source packages
#---------------------------------------------------------------------------------
# 0: User selects manually
# 1: already downloaded
# 2: download packages
#---------------------------------------------------------------------------------
BUILD_DKPRO_DOWNLOAD=0
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Toolchain installation directory, comment if not specified # Toolchain installation directory, comment if not specified
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@@ -36,7 +27,7 @@ BUILD_DKPRO_DOWNLOAD=0
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# Automated script execution # Automated script execution
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# 0: Ask to delete build folders & patched sources # 0: Ask to delete build folders & patched sources
# 1: Use defaults, don't pause for answers # 1: Use defaults, don't pause for answers
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
BUILD_DKPRO_AUTOMATED=0 BUILD_DKPRO_AUTOMATED=0

View File

@@ -1,7 +1,6 @@
#!/bin/bash #!/bin/bash
export CROSSBUILD=i686-w64-mingw32 export CROSSBUILD=i686-w64-mingw32
export CROSSLIBPATH=/opt/i686-w64-mingw32/mingw/lib export CROSSLIBPATH=/opt/mingw32/mingw/lib
export CROSSBINPATH=/opt/i686-w64-mingw32/mingw/bin export CROSSBINPATH=/opt/mingw32/mingw/bin
export PATH=/opt/i686-w64-mingw32/bin:$PATH export PATH=/opt/mingw32/bin:$PATH
export PKG_CONFIG_PATH=$CROSSLIBPATH/pkgconfig export PKG_CONFIG_PATH=$CROSSLIBPATH/pkgconfig

View File

@@ -67,6 +67,25 @@ SECTIONS
. = ALIGN(4); . = ALIGN(4);
} : data } : data
.tdata ALIGN(4) :
{
__tdata_lma = .;
*(.tdata)
*(.tdata.*)
*(.gnu.linkonce.td.*)
. = ALIGN(4);
__tdata_lma_end = .;
} : data
.tbss ALIGN(4) :
{
*(.tbss)
*(.tbss.*)
*(.gnu.linkonce.tb.*)
*(.tcommon)
. = ALIGN(4);
} : data
.preinit_array ALIGN(4) : .preinit_array ALIGN(4) :
{ {
PROVIDE (__preinit_array_start = .); PROVIDE (__preinit_array_start = .);
@@ -115,6 +134,11 @@ SECTIONS
*(.gnu.linkonce.b*) *(.gnu.linkonce.b*)
*(COMMON) *(COMMON)
. = ALIGN(4); . = ALIGN(4);
/* Reserve space for the TLS segment of the main thread */
__tls_start = .;
. += + SIZEOF(.tdata) + SIZEOF(.tbss);
__tls_end = .;
} : data } : data
__bss_end__ = .; __bss_end__ = .;

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
%(old_link) -T 3dsx.ld%s -d --emit-relocs --use-blx %(old_link) -T 3dsx.ld%s -d --emit-relocs --use-blx --gc-sections
*startfile: *startfile:
3dsx_crt0%O%s crti%O%s crtbegin%O%s 3dsx_crt0%O%s crti%O%s crtbegin%O%s

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
%(old_link) -T ds_arm7.ld%s %(old_link) -T ds_arm7.ld%s --gc-sections
*startfile: *startfile:
ds_arm7_crt0%O%s crti%O%s crtbegin%O%s ds_arm7_crt0%O%s crti%O%s crtbegin%O%s

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
%(old_link) -T ds_arm9.mem%s -T ds_arm9.ld%s %(old_link) -T ds_arm9.mem%s -T ds_arm9.ld%s --gc-sections
*startfile: *startfile:
ds_arm9_crt0%O%s crti%O%s crtbegin%O%s ds_arm9_crt0%O%s crti%O%s crtbegin%O%s

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
%(old_link) -T ds_cart.ld%s %(old_link) -T ds_cart.ld%s --gc-sections
*startfile: *startfile:
ds_cart_crt0%O%s crti%O%s crtbegin%O%s ds_cart_crt0%O%s crti%O%s crtbegin%O%s

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
%(old_link) -T dsi_arm9.mem%s -T ds_arm9.ld%s %(old_link) -T dsi_arm9.mem%s -T ds_arm9.ld%s --gc-sections
*startfile: *startfile:
ds_arm9_crt0%O%s crti%O%s crtbegin%O%s ds_arm9_crt0%O%s crti%O%s crtbegin%O%s

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
%(old_link) -T gba_cart.ld%s %(old_link) -T gba_cart.ld%s --gc-sections
*startfile: *startfile:
gba_crt0%O%s crti%O%s crtbegin%O%s gba_crt0%O%s crti%O%s crtbegin%O%s

View File

@@ -2,7 +2,7 @@
%rename endfile old_endfile %rename endfile old_endfile
*link: *link:
-T gba_er.ld%s %(old_link) -T gba_er.ld%s %(old_link) --gc-sections
*startfile: *startfile:
er_crt0%O%s er_crt0%O%s

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
-T gba_mb.ld%s %(old_link) -T gba_mb.ld%s %(old_link) --gc-sections
*startfile: *startfile:
gba_crt0%O%s crti%O%s crtbegin%O%s gba_crt0%O%s crti%O%s crtbegin%O%s

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
%(old_link) -T gp32.ld%s %(old_link) -T gp32.ld%s --gc-sections
*startfile: *startfile:
gp32_crt0%O%s crti%O%s crtbegin%O%s gp32_crt0%O%s crti%O%s crtbegin%O%s

View File

@@ -1,7 +1,7 @@
%rename link old_link %rename link old_link
*link: *link:
%(old_link) -T gp32_gpsdk.ld%s %(old_link) -T gp32_gpsdk.ld%s --gc-sections
*startfile: *startfile:
gp32_gpsdk_crt0%O%s crti%O%s crtbegin%O%s gp32_gpsdk_crt0%O%s crti%O%s crtbegin%O%s

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,147 @@
diff -Nbaur gcc-5.2.0/gcc/config/arm/t-arm-elf gcc-5.2.0-arm/gcc/config/arm/t-arm-elf
--- gcc-5.2.0/gcc/config/arm/t-arm-elf 2015-01-05 12:33:28.000000000 +0000
+++ gcc-5.2.0-arm/gcc/config/arm/t-arm-elf 2015-11-23 20:16:26.736000000 +0000
@@ -16,11 +16,19 @@
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
-MULTILIB_OPTIONS = marm/mthumb
-MULTILIB_DIRNAMES = arm thumb
+MULTILIB_OPTIONS = mthumb march=armv6k mfloat-abi=hard
+MULTILIB_DIRNAMES = thumb armv6k fpu
MULTILIB_EXCEPTIONS =
MULTILIB_MATCHES =
+MULTILIB_REQUIRED = mthumb march=armv6k/mfloat-abi=hard
+
+
+MULTILIB_MATCHES += march?armv6k=mtune?mpcore
+MULTILIB_MATCHES += march?armv6k=mcpu?mpcore
+
+
+
#MULTILIB_OPTIONS += mcpu=fa526/mcpu=fa626/mcpu=fa606te/mcpu=fa626te/mcpu=fmp626/mcpu=fa726te
#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te
#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
@@ -38,9 +46,9 @@
# Not quite true. We can support hard-vfp calling in Thumb2, but how do we
# express that here? Also, we really need architecture v5e or later
# (mcrr etc).
-MULTILIB_OPTIONS += mfloat-abi=hard
-MULTILIB_DIRNAMES += fpu
-MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
+#MULTILIB_OPTIONS += mfloat-abi=hard
+#MULTILIB_DIRNAMES += fpu
+#MULTILIB_EXCEPTIONS += *mthumb/*mfloat-abi=hard*
#MULTILIB_EXCEPTIONS += *mcpu=fa526/*mfloat-abi=hard*
#MULTILIB_EXCEPTIONS += *mcpu=fa626/*mfloat-abi=hard*
diff -Nbaur gcc-5.2.0/gcc/config/arm/unknown-elf.h gcc-5.2.0-arm/gcc/config/arm/unknown-elf.h
--- gcc-5.2.0/gcc/config/arm/unknown-elf.h 2015-11-28 18:13:20.576000000 +0000
+++ gcc-5.2.0-arm/gcc/config/arm/unknown-elf.h 2015-11-28 18:14:06.328000000 +0000
@@ -29,7 +29,7 @@
#endif
/* Now we define the strings used to build the spec file. */
-#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
+#define UNKNOWN_ELF_STARTFILE_SPEC " crti%O%s crtbegin%O%s"
#undef STARTFILE_SPEC
#define STARTFILE_SPEC UNKNOWN_ELF_STARTFILE_SPEC
@@ -93,4 +93,4 @@
udivmoddi4, which will depend on the exception unwind routines,
which will depend on abort, which is defined in libc. */
#undef LINK_GCC_C_SEQUENCE_SPEC
-#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L --end-group"
+#define LINK_GCC_C_SEQUENCE_SPEC "--start-group %G %L %(libgloss) --end-group"
diff -Nbaur gcc-5.2.0/gcc/gcc.c gcc-5.2.0-arm/gcc/gcc.c
--- gcc-5.2.0/gcc/gcc.c 2015-03-10 09:37:41.000000000 +0000
+++ gcc-5.2.0-arm/gcc/gcc.c 2015-11-23 20:16:26.740000000 +0000
@@ -647,6 +647,11 @@
#endif
#endif
+#ifndef LIBGLOSS_SPEC
+# define LIBGLOSS_SPEC "-lsysbase"
+#endif
+
+
/* config.h can define STARTFILE_SPEC to override the default crt0 files. */
#ifndef STARTFILE_SPEC
#define STARTFILE_SPEC \
@@ -879,6 +884,7 @@
static const char *lib_spec = LIB_SPEC;
static const char *link_gomp_spec = "";
static const char *libgcc_spec = LIBGCC_SPEC;
+static const char *libgloss_spec = LIBGLOSS_SPEC;
static const char *endfile_spec = ENDFILE_SPEC;
static const char *startfile_spec = STARTFILE_SPEC;
static const char *linker_name_spec = LINKER_NAME;
@@ -1374,6 +1380,7 @@
INIT_STATIC_SPEC ("lib", &lib_spec),
INIT_STATIC_SPEC ("link_gomp", &link_gomp_spec),
INIT_STATIC_SPEC ("libgcc", &libgcc_spec),
+ INIT_STATIC_SPEC ("libgloss", &libgloss_spec),
INIT_STATIC_SPEC ("startfile", &startfile_spec),
INIT_STATIC_SPEC ("cross_compile", &cross_compile),
INIT_STATIC_SPEC ("version", &compiler_version),
diff -Nbaur gcc-5.2.0/gcc/Makefile.in gcc-5.2.0-arm/gcc/Makefile.in
--- gcc-5.2.0/gcc/Makefile.in 2015-05-04 11:46:32.000000000 +0100
+++ gcc-5.2.0-arm/gcc/Makefile.in 2015-11-23 20:16:26.744000000 +0000
@@ -1053,8 +1053,8 @@
# things like the go/%.o rule work properly; but we use $(*F) for the
# file part, as we just want the file part of the stem, not the entire
# file name.
-COMPILE = $(COMPILE.base) -MT $@ -MMD -MP -MF $(@D)/$(DEPDIR)/$(*F).TPo
-POSTCOMPILE = @mv $(@D)/$(DEPDIR)/$(*F).TPo $(@D)/$(DEPDIR)/$(*F).Po
+COMPILE = $(COMPILE.base)
+POSTCOMPILE =
else
COMPILE = source='$<' object='$@' libtool=no \
DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) $(COMPILE.base)
diff -Nbaur gcc-5.2.0/libcpp/Makefile.in gcc-5.2.0-arm/libcpp/Makefile.in
--- gcc-5.2.0/libcpp/Makefile.in 2015-07-16 10:16:25.000000000 +0100
+++ gcc-5.2.0-arm/libcpp/Makefile.in 2015-11-23 20:16:26.744000000 +0000
@@ -208,8 +208,7 @@
# Note that we put the dependencies into a .Tpo file, then move them
# into place if the compile succeeds. We need this because gcc does
# not atomically write the dependency output file.
-COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Tpo
-POSTCOMPILE = @mv $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+COMPILE = $(COMPILE.base) -o $@
else
COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
$(depcomp) $(COMPILE.base)
diff -Nbaur gcc-5.2.0/libgcc/config/arm/t-bpabi gcc-5.2.0-arm/libgcc/config/arm/t-bpabi
--- gcc-5.2.0/libgcc/config/arm/t-bpabi 2012-08-17 16:06:06.000000000 +0100
+++ gcc-5.2.0-arm/libgcc/config/arm/t-bpabi 2015-11-23 20:16:26.744000000 +0000
@@ -17,4 +17,4 @@
# On ARM, specifying -fnon-call-exceptions will needlessly pull in
# the unwinder in simple programs which use 64-bit division. Omitting
# the option is safe.
-LIB2_DIVMOD_EXCEPTION_FLAGS := -fexceptions
+LIB2_DIVMOD_EXCEPTION_FLAGS := -fno-exceptions
diff -Nbaur gcc-5.2.0/libgcc/crtstuff.c gcc-5.2.0-arm/libgcc/crtstuff.c
--- gcc-5.2.0/libgcc/crtstuff.c 2015-01-05 12:33:28.000000000 +0000
+++ gcc-5.2.0-arm/libgcc/crtstuff.c 2015-11-23 20:16:26.744000000 +0000
@@ -47,7 +47,7 @@
/* Target machine header files require this define. */
#define IN_LIBGCC2
-
+#define USED_FOR_TARGET
/* FIXME: Including auto-host is incorrect, but until we have
identified the set of defines that need to go into auto-target.h,
this will have to do. */
diff -Nbaur gcc-5.2.0/libgcc/Makefile.in gcc-5.2.0-arm/libgcc/Makefile.in
--- gcc-5.2.0/libgcc/Makefile.in 2015-01-29 08:03:56.000000000 +0000
+++ gcc-5.2.0-arm/libgcc/Makefile.in 2015-11-23 20:16:26.744000000 +0000
@@ -819,7 +819,7 @@
# libgcc_eh.a, only LIB2ADDEH matters. If we do, only LIB2ADDEHSTATIC and
# LIB2ADDEHSHARED matter. (Usually all three are identical.)
-c_flags := -fexceptions
+c_flags := -fno-exceptions
ifeq ($(enable_shared),yes)

View File

@@ -1,7 +1,7 @@
diff -Nbaur gdb-7.7.1/gdb/Makefile.in gdb-7.7.1-arm/gdb/Makefile.in diff -NBaur gdb-7.10/gdb/Makefile.in gdb-7.10-arm/gdb/Makefile.in
--- gdb-7.7.1/gdb/Makefile.in 2014-05-05 22:51:24.000000000 +0100 --- gdb-7.10/gdb/Makefile.in 2015-08-28 22:22:07.000000000 +0100
+++ gdb-7.7.1-arm/gdb/Makefile.in 2014-05-18 17:05:16.105567001 +0100 +++ gdb-7.10-arm/gdb/Makefile.in 2015-10-21 08:54:36.492597858 +0100
@@ -2307,10 +2307,8 @@ @@ -2676,10 +2676,8 @@
# Note that we put the dependencies into a .Tpo file, then move them # Note that we put the dependencies into a .Tpo file, then move them
# into place if the compile succeeds. We need this because gcc does # into place if the compile succeeds. We need this because gcc does
# not atomically write the dependency output file. # not atomically write the dependency output file.
@@ -14,10 +14,10 @@ diff -Nbaur gdb-7.7.1/gdb/Makefile.in gdb-7.7.1-arm/gdb/Makefile.in
@GMAKE_TRUE@else @GMAKE_TRUE@else
@GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \ @GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \
@GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC) @GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
diff -Nbaur gdb-7.7.1/sim/common/Make-common.in gdb-7.7.1-arm/sim/common/Make-common.in diff -NBaur gdb-7.10/sim/common/Make-common.in gdb-7.10-arm/sim/common/Make-common.in
--- gdb-7.7.1/sim/common/Make-common.in 2014-01-08 09:23:36.000000000 +0000 --- gdb-7.10/sim/common/Make-common.in 2015-07-06 20:57:46.000000000 +0100
+++ gdb-7.7.1-arm/sim/common/Make-common.in 2014-05-18 17:05:16.105567001 +0100 +++ gdb-7.10-arm/sim/common/Make-common.in 2015-10-21 08:54:36.492597858 +0100
@@ -415,10 +415,8 @@ @@ -421,10 +421,8 @@
# Note that we put the dependencies into a .Tpo file, then move them # Note that we put the dependencies into a .Tpo file, then move them
# into place if the compile succeeds. We need this because gcc does # into place if the compile succeeds. We need this because gcc does
# not atomically write the dependency output file. # not atomically write the dependency output file.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -4,14 +4,16 @@ endif
include $(DEVKITARM)/base_rules include $(DEVKITARM)/base_rules
CTRULIB := $(DEVKITPRO)/libctru PORTLIBS := $(PORTLIBS_PATH)/armv6k $(PORTLIBS_PATH)/3ds
CTRULIB ?= $(DEVKITPRO)/libctru
ifeq ($(strip $(APP_TITLE)),) ifeq ($(strip $(APP_TITLE)),)
APP_TITLE := $(notdir $(OUTPUT)) APP_TITLE := $(notdir $(OUTPUT))
endif endif
ifeq ($(strip $(APP_DESCRIPTION)),) ifeq ($(strip $(APP_DESCRIPTION)),)
APP_DESCRIPTION := Built with devkitARM & ctrulib APP_DESCRIPTION := Built with devkitARM & libctru
endif endif
ifeq ($(strip $(APP_AUTHOR)),) ifeq ($(strip $(APP_AUTHOR)),)
@@ -29,7 +31,7 @@ endif
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%.3dsx: %.elf %.3dsx: %.elf
@3dsxtool $< $@ @3dsxtool $< $@ $(_3DSXFLAGS)
@echo built ... $(notdir $@) @echo built ... $(notdir $@)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------

View File

@@ -3,8 +3,7 @@ include $(DEVKITARM)/base_tools
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# add portlibs path # add portlibs path
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
export PORTLIBS := $(DEVKITPRO)/portlibs/arm export PORTLIBS_PATH := $(DEVKITPRO)/portlibs
export PATH := $(PORTLIBS)/bin:$(PATH)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
@@ -18,7 +17,7 @@ export PATH := $(PORTLIBS)/bin:$(PATH)
%.arm.o: %.arm.cpp %.arm.o: %.arm.cpp
@echo $(notdir $<) @echo $(notdir $<)
$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.arm.d $(CXXFLAGS) -marm -c $< -o $@ $(ERROR_FILTER) $(CXX) -MMD -MP -MF $(DEPSDIR)/$*.arm.d $(CXXFLAGS) -marm -c $< -o $@ $(ERROR_FILTER)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%.arm.o: %.arm.c %.arm.o: %.arm.c
@echo $(notdir $<) @echo $(notdir $<)
@@ -33,7 +32,7 @@ export PATH := $(PORTLIBS)/bin:$(PATH)
%.thumb.o: %.thumb.cpp %.thumb.o: %.thumb.cpp
@echo $(notdir $<) @echo $(notdir $<)
$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.thumb.d $(CXXFLAGS) -mthumb -c $< -o $@ $(ERROR_FILTER) $(CXX) -MMD -MP -MF $(DEPSDIR)/$*.thumb.d $(CXXFLAGS) -mthumb -c $< -o $@ $(ERROR_FILTER)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%.thumb.o: %.thumb.c %.thumb.o: %.thumb.c
@echo $(notdir $<) @echo $(notdir $<)
@@ -48,7 +47,7 @@ export PATH := $(PORTLIBS)/bin:$(PATH)
%.iwram.o: %.iwram.cpp %.iwram.o: %.iwram.cpp
@echo $(notdir $<) @echo $(notdir $<)
$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.iwram.d $(CXXFLAGS) -marm -mlong-calls -c $< -o $@ $(ERROR_FILTER) $(CXX) -MMD -MP -MF $(DEPSDIR)/$*.iwram.d $(CXXFLAGS) -marm -mlong-calls -c $< -o $@ $(ERROR_FILTER)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%.iwram.o: %.iwram.c %.iwram.o: %.iwram.c
@echo $(notdir $<) @echo $(notdir $<)
@@ -63,7 +62,7 @@ export PATH := $(PORTLIBS)/bin:$(PATH)
%.itcm.o: %.itcm.cpp %.itcm.o: %.itcm.cpp
@echo $(notdir $<) @echo $(notdir $<)
$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.itcm.d $(CXXFLAGS) -marm -mlong-calls -c $< -o $@ $(ERROR_FILTER) $(CXX) -MMD -MP -MF $(DEPSDIR)/$*.itcm.d $(CXXFLAGS) -marm -mlong-calls -c $< -o $@ $(ERROR_FILTER)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%.itcm.o: %.itcm.c %.itcm.o: %.itcm.c
@echo $(notdir $<) @echo $(notdir $<)
@@ -79,7 +78,7 @@ export PATH := $(PORTLIBS)/bin:$(PATH)
%.o: %.cpp %.o: %.cpp
@echo $(notdir $<) @echo $(notdir $<)
$(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER) $(CXX) -MMD -MP -MF $(DEPSDIR)/$*.d $(CXXFLAGS) -c $< -o $@ $(ERROR_FILTER)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%.o: %.c %.o: %.c
@echo $(notdir $<) @echo $(notdir $<)

View File

@@ -1,13 +1,11 @@
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# change shell on Snow Leopard # make sure we have bash on OSX
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
UNAME_R := $(shell uname -r) UNAME_R := $(shell uname -r)
ifneq (,$(findstring Darwin,$(UNAME_S))) ifneq (,$(findstring Darwin,$(UNAME_S)))
ifneq (,$(findstring 10.8.0,$(UNAME_R))) export SHELL=/bin/bash
export SHELL=/bin/bash
endif
endif endif
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
# path to tools # path to tools
@@ -22,10 +20,11 @@ PREFIX := arm-none-eabi-
export CC := $(PREFIX)gcc export CC := $(PREFIX)gcc
export CXX := $(PREFIX)g++ export CXX := $(PREFIX)g++
export AS := $(PREFIX)as export AS := $(PREFIX)as
export AR := $(PREFIX)ar export AR := $(PREFIX)gcc-ar
export OBJCOPY := $(PREFIX)objcopy export OBJCOPY := $(PREFIX)objcopy
export STRIP := $(PREFIX)strip export STRIP := $(PREFIX)strip
export NM := $(PREFIX)nm export NM := $(PREFIX)gcc-nm
export RANLIB := $(PREFIX)gcc-ranlib
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH)) ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))

View File

@@ -4,7 +4,9 @@ endif
include $(DEVKITARM)/base_rules include $(DEVKITARM)/base_rules
LIBNDS := $(DEVKITPRO)/libnds PORTLIBS := $(PORTLIBS_PATH)/nds $(PORTLIBS_PATH)/armv5te
LIBNDS := $(DEVKITPRO)/libnds
ifeq ($(strip $(GAME_TITLE)),) ifeq ($(strip $(GAME_TITLE)),)
GAME_TITLE := $(notdir $(OUTPUT)) GAME_TITLE := $(notdir $(OUTPUT))
@@ -40,7 +42,7 @@ endif
%.arm9: %.elf %.arm9: %.elf
@$(OBJCOPY) -O binary $< $@ @$(OBJCOPY) -O binary $< $@
@echo built ... $(notdir $@) @echo built ... $(notdir $@)
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
%.arm7: %.elf %.arm7: %.elf
@$(OBJCOPY) -O binary $< $@ @$(OBJCOPY) -O binary $< $@

View File

@@ -4,6 +4,8 @@ endif
include $(DEVKITARM)/base_rules include $(DEVKITARM)/base_rules
PORTLIBS := $(PORTLIBS_PATH)/gba $(PORTLIBS_PATH)/armv4
LIBGBA := $(DEVKITPRO)/libgba LIBGBA := $(DEVKITPRO)/libgba
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------

View File

@@ -1,5 +1,7 @@
-include $(DEVKITARM)/base_rules -include $(DEVKITARM)/base_rules
PORTLIBS := $(PORTLIBS_PATH)/gp32 $(PORTLIBS_PATH)/armv4
LIBMIRKO := $(DEVKITPRO)/libmirko LIBMIRKO := $(DEVKITPRO)/libmirko
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------

View File

@@ -21,7 +21,7 @@ $MAKE CRT=gp32_gpsdk
$MAKE CRT=ds_arm7 $MAKE CRT=ds_arm7
$MAKE CRT=ds_arm9 $MAKE CRT=ds_arm9
$MAKE CRT=ds_cart $MAKE CRT=ds_cart
$MAKE CRT=3dsx $target-gcc -march=armv6k -mfloat-abi=hard -c 3dsx_crt0.s -o armv6k/fpu/3dsx_crt0.o
cd $BUILDDIR/libgba-$LIBGBA_VER cd $BUILDDIR/libgba-$LIBGBA_VER
$MAKE || { echo "error building libgba"; exit 1; } $MAKE || { echo "error building libgba"; exit 1; }

View File

@@ -43,10 +43,12 @@ then
--enable-languages=c,c++,objc,obj-c++ \ --enable-languages=c,c++,objc,obj-c++ \
--with-gnu-as --with-gnu-ld --with-gcc \ --with-gnu-as --with-gnu-ld --with-gcc \
--with-march=armv4t\ --with-march=armv4t\
--enable-cxx-flags='-ffunction-sections' \
--disable-libstdcxx-verbose \
--enable-poison-system-directories \ --enable-poison-system-directories \
--enable-interwork --enable-multilib \ --enable-interwork --enable-multilib \
--disable-dependency-tracking \ --disable-dependency-tracking \
--disable-threads --disable-win32-registry --disable-nls --disable-debug\ --enable-threads --disable-win32-registry --disable-nls --disable-debug\
--disable-libmudflap --disable-libssp --disable-libgomp \ --disable-libmudflap --disable-libssp --disable-libgomp \
--disable-libstdcxx-pch \ --disable-libstdcxx-pch \
--target=$target \ --target=$target \
@@ -54,7 +56,7 @@ then
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \ --with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
--prefix=$prefix \ --prefix=$prefix \
--enable-lto $plugin_ld\ --enable-lto $plugin_ld\
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 43" \ --with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 45" \
$CROSS_PARAMS \ $CROSS_PARAMS \
|| { echo "Error configuring gcc"; exit 1; } || { echo "Error configuring gcc"; exit 1; }
touch configured-gcc touch configured-gcc
@@ -84,12 +86,9 @@ cd $target/newlib
if [ ! -f configured-newlib ] if [ ! -f configured-newlib ]
then then
CFLAGS_FOR_TARGET="-DREENTRANT_SYSCALLS_PROVIDED -D__DEFAULT_UTF8__ -O2" ../../newlib-$NEWLIB_VER/configure \ ../../newlib-$NEWLIB_VER/configure \
--disable-newlib-supplied-syscalls \ --disable-newlib-supplied-syscalls \
--enable-newlib-mb \ --enable-newlib-mb \
--enable-newlib-io-long-long \
--enable-newlib-io-c99-formats \
--enable-newlib-io-pos-args \
--target=$target \ --target=$target \
--prefix=$prefix \ --prefix=$prefix \
|| { echo "Error configuring newlib"; exit 1; } || { echo "Error configuring newlib"; exit 1; }

4
dkarm-eabi/scripts/build-tools.sh Normal file → Executable file
View File

@@ -10,11 +10,11 @@ do
touch configured touch configured
fi fi
if [ ! -f built ]; then if [ ! -f built ]; then
$MAKE || { echo "error building $archive"; exit 1; } $MAKE || { echo "error building $dir"; exit 1; }
touch built touch built
fi fi
if [ ! -f installed ]; then if [ ! -f installed ]; then
$MAKE install || { echo "error installing $archive"; exit 1; } $MAKE install || { echo "error installing $dir"; exit 1; }
touch installed touch installed
fi fi
done done

View File

@@ -30,10 +30,10 @@ done
case "$VERSION" in case "$VERSION" in
"1" ) "1" )
GCC_VER=4.9.2 GCC_VER=5.3.0
BINUTILS_VER=2.24 BINUTILS_VER=2.25.1
NEWLIB_VER=2.1.0 NEWLIB_VER=2.2.0
GDB_VER=7.7.1 GDB_VER=7.10
basedir='dkarm-eabi' basedir='dkarm-eabi'
package=devkitARM package=devkitARM
target=arm-none-eabi target=arm-none-eabi