mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-08-21 01:44:16 -05:00
Compare commits
191 Commits
devkitPSP_
...
v20161115
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc708a543c | ||
|
|
9e5843b414 | ||
|
|
811c6a45b4 | ||
|
|
b1e0b0abd8 | ||
|
|
be6c50e32e | ||
|
|
3ef75548cf | ||
|
|
cb663299d1 | ||
|
|
3ba03b29f2 | ||
|
|
64492fe29c | ||
|
|
0026b3450c | ||
|
|
7f9fa7a161 | ||
|
|
cd8a1b3c85 | ||
|
|
ca40deb9ee | ||
|
|
3a2688063a | ||
|
|
4c47502632 | ||
|
|
eb23f198ad | ||
|
|
a1221bad50 | ||
|
|
1b65df77a3 | ||
|
|
e48ba38ce5 | ||
|
|
1d6cd5b344 | ||
|
|
e2d1ec8882 | ||
|
|
25e4deb095 | ||
|
|
ff9b2dd329 | ||
|
|
b6511b156c | ||
|
|
ca6443a27c | ||
|
|
5b1d0458dc | ||
|
|
116ad3bfc4 | ||
|
|
d8e737b988 | ||
|
|
b033aa91b2 | ||
|
|
3f149af10d | ||
|
|
dc93157478 | ||
|
|
a62a3f6379 | ||
|
|
6698343534 | ||
|
|
c8d5125ac3 | ||
|
|
e257f22430 | ||
|
|
3b8d9c702d | ||
|
|
f9dd6655ec | ||
|
|
3fcebd74b2 | ||
|
|
ac39e253ff | ||
|
|
ca6674a81d | ||
|
|
cf2e5124ce | ||
|
|
c4a55871e4 | ||
|
|
67f27e6455 | ||
|
|
ff6e2b58c6 | ||
|
|
50514b3c7f | ||
|
|
5e86d85526 | ||
|
|
f8998e03ce | ||
|
|
af4c3ff66a | ||
|
|
0ca5bf65c0 | ||
|
|
564fa0e0af | ||
|
|
47ddd93e55 | ||
|
|
fea87e834c | ||
|
|
bb1c5bba94 | ||
|
|
0e404ac683 | ||
|
|
dd0500e539 | ||
|
|
46989bb607 | ||
|
|
827f20a398 | ||
|
|
e4270dc3d2 | ||
|
|
ac72c96c00 | ||
|
|
83fb7448d8 | ||
|
|
6e94598966 | ||
|
|
14359b772f | ||
|
|
1f4243ead0 | ||
|
|
207d78ae00 | ||
|
|
9362ca7bac | ||
|
|
f6d47b4005 | ||
|
|
c384a5097c | ||
|
|
074ceec36c | ||
|
|
e0c31cded7 | ||
|
|
fdc132d773 | ||
|
|
cb1caec39b | ||
|
|
35fe7968da | ||
|
|
c1cca846a3 | ||
|
|
5b64b79621 | ||
|
|
598983a38a | ||
|
|
e88c516694 | ||
|
|
d3505fdf69 | ||
|
|
62b2adce92 | ||
|
|
4fbb8b8b54 | ||
|
|
9fb5310f7d | ||
|
|
2a8f1980d8 | ||
|
|
0b9a5d7f76 | ||
|
|
bfdab38a67 | ||
|
|
802007e17f | ||
|
|
7f5147f4ec | ||
|
|
2e2905ee72 | ||
|
|
08f90d3343 | ||
|
|
59cbc65a94 | ||
|
|
3d49b7287a | ||
|
|
5305d2e77e | ||
|
|
742742f275 | ||
|
|
c3248e2ed5 | ||
|
|
9a1e7dfb06 | ||
|
|
bb4be681cb | ||
|
|
c6f7acb7eb | ||
|
|
939f373da5 | ||
|
|
84d9590a9c | ||
|
|
b28d86537e | ||
|
|
dab44c9fe2 | ||
|
|
94f707c93e | ||
|
|
5522eb47bc | ||
|
|
ad68b25d09 | ||
|
|
ff7a467958 | ||
|
|
a31587e78a | ||
|
|
f846fe610b | ||
|
|
47e4fcbee5 | ||
|
|
7a6994a1c7 | ||
|
|
fdd2a20b33 | ||
|
|
7546e1e65a | ||
|
|
c2be5b3865 | ||
|
|
18b81c32e8 | ||
|
|
9c53de7304 | ||
|
|
be191f464a | ||
|
|
466748e63c | ||
|
|
213b8b293d | ||
|
|
63fc9bb5e5 | ||
|
|
fe1d504432 | ||
|
|
970e965ba5 | ||
|
|
192c28db55 | ||
|
|
c4ab14acb2 | ||
|
|
334b3ab083 | ||
|
|
958eb2bae6 | ||
|
|
30c83ed3d0 | ||
|
|
f7de61f3c9 | ||
|
|
e897a44640 | ||
|
|
e0caf9ea02 | ||
|
|
e454bd0dd7 | ||
|
|
ac53b3f62f | ||
|
|
bb77177e7b | ||
|
|
00dfc2dbbb | ||
|
|
98596aad6d | ||
|
|
2f10349942 | ||
|
|
ae01482942 | ||
|
|
b8b237c88d | ||
|
|
2ebf134e6f | ||
|
|
1689594d0a | ||
|
|
ccae1fd3bc | ||
|
|
97f020d9dd | ||
|
|
a9486a0343 | ||
|
|
4abda470f2 | ||
|
|
423bf8e261 | ||
|
|
e012872028 | ||
|
|
695eb60d08 | ||
|
|
98ed1540dd | ||
|
|
2f624a1c28 | ||
|
|
f31d3ff732 | ||
|
|
d6ea5c780e | ||
|
|
2c11d43aef | ||
|
|
dcc84df004 | ||
|
|
496091cd3d | ||
|
|
365d7f8e70 | ||
|
|
acde84974f | ||
|
|
b72392a9f1 | ||
|
|
8bb0b846dc | ||
|
|
814731ce26 | ||
|
|
2088ec214e | ||
|
|
722d723f96 | ||
|
|
0c0cf5f076 | ||
|
|
fc5620fcfa | ||
|
|
ea2bddb2ed | ||
|
|
27249e6df4 | ||
|
|
9eca385eea | ||
|
|
ad8c286e3f | ||
|
|
3b602dd277 | ||
|
|
2719a32a3c | ||
|
|
bddbc05347 | ||
|
|
31a3aebd97 | ||
|
|
398f970194 | ||
|
|
8adc6c5a3a | ||
|
|
9c99a85093 | ||
|
|
3a50a29076 | ||
|
|
71c4499626 | ||
|
|
93040254e6 | ||
|
|
6cd779bb23 | ||
|
|
0b27b8fd31 | ||
|
|
7467c56259 | ||
|
|
c372699fc7 | ||
|
|
4572684bf5 | ||
|
|
89fa563280 | ||
|
|
c9b0f0a993 | ||
|
|
def31f974b | ||
|
|
1baf7cd020 | ||
|
|
edbd8b0249 | ||
|
|
471ea1e10e | ||
|
|
c970193166 | ||
|
|
4a41ed304e | ||
|
|
bf3a5359b4 | ||
|
|
93f3a57a16 | ||
|
|
fb92e0d43e | ||
|
|
98adbbcc9b | ||
|
|
d98429e0fa |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,3 +2,6 @@ config.sh
|
|||||||
.devkitARM*
|
.devkitARM*
|
||||||
.devkitPPC*
|
.devkitPPC*
|
||||||
.devkitPSP*
|
.devkitPSP*
|
||||||
|
*.gz
|
||||||
|
*.bz2
|
||||||
|
*~
|
||||||
|
|||||||
78
README.TXT
78
README.TXT
@@ -1,59 +1,70 @@
|
|||||||
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.
|
||||||
|
|
||||||
To use these scripts under minsys and MinGW you will need some additional packages over and above the base install.
|
The windows versions of the toolchains are now cross compiled on linux using
|
||||||
|
mingw-w64
|
||||||
|
|
||||||
The minsys developer toolkit
|
Preparing to build
|
||||||
|
--------------------------
|
||||||
http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?download
|
|
||||||
|
|
||||||
Bison, Flex and Wget from the gnuwin32 project
|
|
||||||
|
|
||||||
http://sourceforge.net/projects/gnuwin32/
|
|
||||||
|
|
||||||
For devkitPSP a command line subversion client is required to get the PSP SDK http://www.tigris.org
|
|
||||||
|
|
||||||
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
|
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
|
For building gcc libgmp, libmpfr and libmpc are required - these are built as
|
||||||
|
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 and zlib
|
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev
|
||||||
|
|
||||||
|
Some of the tools for devkitARM and devkitPPC also require FreeImage, zlib,
|
||||||
|
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
|
||||||
Downloading the source packages
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
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).
|
sudo apt-get install libfreeimage-dev zlib1g-dev libusb-dev
|
||||||
|
|
||||||
|
Building gxtexconv for cube/wii needs GL/gl.h which can be obtained with
|
||||||
|
|
||||||
|
sudo apt-get install mesa-common-dev
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
@@ -65,25 +76,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, -mwup for wii u.
|
||||||
|
|
||||||
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
|
||||||
-------
|
-------
|
||||||
@@ -91,6 +108,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.
|
||||||
|
|||||||
107
build-devkit.sh
107
build-devkit.sh
@@ -1,18 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# Build scripts for
|
# devkitARM release 45
|
||||||
# devkitARM release 38
|
# devkitPPC release 28
|
||||||
# devkitPPC release 26
|
|
||||||
# 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/"
|
||||||
echo
|
echo
|
||||||
echo "The scripts in svn are quite often dependent on things which currently only exist on developer"
|
echo "The scripts in the git repository are quite often dependent on things which currently only exist"
|
||||||
echo "machines. This is not a bug, use stable releases."
|
echo "on developer machines. This is not a bug, use stable releases."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -24,43 +23,39 @@ echo "Patches and improvements are of course welcome, please send these to the p
|
|||||||
echo "https://sourceforge.net/tracker/?group_id=114505&atid=668553"
|
echo "https://sourceforge.net/tracker/?group_id=114505&atid=668553"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
LIBOGC_VER=1.8.10
|
LIBOGC_VER=1.8.15
|
||||||
LIBGBA_VER=20090222
|
LIBGBA_VER=20150106
|
||||||
LIBNDS_VER=1.5.5
|
LIBNDS_VER=1.5.12
|
||||||
DEFAULT_ARM7_VER=0.5.24
|
LIBCTRU_VER=0.6.0
|
||||||
DSWIFI_VER=0.3.13
|
DEFAULT_ARM7_VER=0.6.0
|
||||||
|
DSWIFI_VER=0.3.17
|
||||||
LIBMIRKO_VER=0.9.7
|
LIBMIRKO_VER=0.9.7
|
||||||
MAXMOD_VER=1.0.7
|
MAXMOD_VER=1.0.9
|
||||||
FILESYSTEM_VER=0.9.9
|
FILESYSTEM_VER=0.9.12
|
||||||
LIBFAT_VER=1.0.11
|
LIBFAT_VER=1.0.14
|
||||||
PSPSDK_VER=20120404
|
PSPSDK_VER=20120404
|
||||||
GBATOOLS_VER=1.0.0
|
GBATOOLS_VER=1.0.0
|
||||||
GRIT_VER=0.8.10
|
DSTOOLS_VER=1.0.2
|
||||||
NDSTOOL_VER=1.50.1
|
GP32_TOOLS_VER=1.0.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.1
|
||||||
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.8.1
|
||||||
|
STLINK_VER=0.5.8
|
||||||
|
TOOLS3DS_VER=1.1.1
|
||||||
|
LINK3DS_VER=0.5.1
|
||||||
|
PICASSO_VER=2.1.0
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
function extract_and_patch {
|
function extract_and_patch {
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
if [ ! -f extracted-$1 ]; then
|
if [ ! -f extracted-$1 ]; then
|
||||||
echo "extracting $1"
|
echo "extracting $1"
|
||||||
if [ $3 == "bz2" ]; then
|
tar -xf "$SRCDIR/$1-$2.tar.$3" || { echo "Error extracting "$1; exit 1; }
|
||||||
extractflags="-xjf"
|
|
||||||
archivetype=".tar.bz2"
|
|
||||||
elif [ $3 == "gz" ]; then
|
|
||||||
extractflags="-xzf"
|
|
||||||
archivetype=".tar.gz"
|
|
||||||
else
|
|
||||||
echo "invalid archive type"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
tar $extractflags $SRCDIR/$1-$2$archivetype || { echo "Error extracting "$1; exit 1; }
|
|
||||||
touch extracted-$1
|
touch extracted-$1
|
||||||
fi
|
fi
|
||||||
if [[ ! -f patched-$1 && -f $patchdir/$1-$2.patch ]]; then
|
if [[ ! -f patched-$1 && -f $patchdir/$1-$2.patch ]]; then
|
||||||
@@ -87,7 +82,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."
|
||||||
@@ -109,7 +104,7 @@ else
|
|||||||
echo "for mingw/msys you must use <drive>:/<install path> or you will have include path problems"
|
echo "for mingw/msys you must use <drive>:/<install path> or you will have include path problems"
|
||||||
echo "this is the top level directory for devkitpro, i.e. e:/devkitPro"
|
echo "this is the top level directory for devkitpro, i.e. e:/devkitPro"
|
||||||
|
|
||||||
read INSTALLDIR
|
read -e INSTALLDIR
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -154,7 +149,7 @@ fi
|
|||||||
if [ "$BUILD_DKPRO_AUTOMATED" != "1" ] ; then
|
if [ "$BUILD_DKPRO_AUTOMATED" != "1" ] ; then
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo 'Ready to install '$package' in '$INSTALLDIR
|
echo 'Ready to install '$package' in '$prefix
|
||||||
echo
|
echo
|
||||||
echo 'press return to continue'
|
echo 'press return to continue'
|
||||||
|
|
||||||
@@ -164,10 +159,8 @@ PLATFORM=`uname -s`
|
|||||||
|
|
||||||
case $PLATFORM in
|
case $PLATFORM in
|
||||||
Darwin )
|
Darwin )
|
||||||
cflags="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
|
cflags="-mmacosx-version-min=10.5 -isysroot /Developer/SDKs/MacOSX10.5.sdk -I/usr/local/include"
|
||||||
ldflags="-mmacosx-version-min=10.4 -arch i386 -arch ppc -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk"
|
ldflags="-mmacosx-version-min=10.5 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.5.sdk -L/usr/local/lib"
|
||||||
export CC=gcc-4.0
|
|
||||||
export CXX=g++-4.0
|
|
||||||
;;
|
;;
|
||||||
MINGW32* )
|
MINGW32* )
|
||||||
cflags="-D__USE_MINGW_ACCESS"
|
cflags="-D__USE_MINGW_ACCESS"
|
||||||
@@ -189,22 +182,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"
|
libfat-src-${LIBFAT_VER}.tar.bz2 libctru-src-${LIBCTRU_VER}.tar.bz2"
|
||||||
hostarchives="gbatools-$GBATOOLS_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"
|
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
|
||||||
|
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
|
||||||
@@ -213,7 +214,7 @@ else
|
|||||||
SRCDIR=`pwd`
|
SRCDIR=`pwd`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $SRCDIR
|
cd "$SRCDIR"
|
||||||
for archive in $archives $targetarchives $hostarchives
|
for archive in $archives $targetarchives $hostarchives
|
||||||
do
|
do
|
||||||
echo $archive
|
echo $archive
|
||||||
@@ -238,13 +239,16 @@ do
|
|||||||
echo $destdir
|
echo $destdir
|
||||||
if [ ! -d $destdir ]; then
|
if [ ! -d $destdir ]; then
|
||||||
mkdir -p $destdir
|
mkdir -p $destdir
|
||||||
bzip2 -cd $SRCDIR/$archive | tar -xf - -C $destdir || { echo "Error extracting "$archive; exit 1; }
|
bzip2 -cd "$SRCDIR/$archive" | tar -xf - -C $destdir || { echo "Error extracting "$archive; exit 1; }
|
||||||
fi
|
fi
|
||||||
done
|
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
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
@@ -254,12 +258,15 @@ if [ -f $scriptdir/build-gcc.sh ]; then . $scriptdir/build-gcc.sh || { echo "Err
|
|||||||
if [ -f $scriptdir/build-tools.sh ]; then . $scriptdir/build-tools.sh || { echo "Error building tools"; exit 1; }; cd $BUILDSCRIPTDIR; fi
|
if [ -f $scriptdir/build-tools.sh ]; then . $scriptdir/build-tools.sh || { echo "Error building tools"; exit 1; }; cd $BUILDSCRIPTDIR; fi
|
||||||
if [ -f $scriptdir/build-crtls.sh ]; then . $scriptdir/build-crtls.sh || { echo "Error building crtls"; exit 1; }; cd $BUILDSCRIPTDIR; fi
|
if [ -f $scriptdir/build-crtls.sh ]; then . $scriptdir/build-crtls.sh || { echo "Error building crtls"; exit 1; }; cd $BUILDSCRIPTDIR; fi
|
||||||
|
|
||||||
if [ "$CROSSBUILD" = "i686-w64-mingw32" ]; then
|
if [ ! -z $CROSSBUILD ]; then
|
||||||
if [ $VERSION -ne 3 ]; then
|
if [ $VERSION -ne 3 ]; then
|
||||||
cp -v /opt/i686-w64-mingw32/mingw/lib/FreeImage.dll $prefix/bin
|
cp -v $CROSSBINPATH/FreeImage.dll $prefix/bin
|
||||||
fi
|
fi
|
||||||
cp -v /opt/i686-w64-mingw32/mingw/lib/libstdc++-6.dll \
|
if [ $VERSION -eq 1 ]; then
|
||||||
/opt/i686-w64-mingw32/mingw/lib/libgcc_s_sjlj-1.dll \
|
cp -v $CROSSBINPATH/libusb-1.0.dll $prefix/bin
|
||||||
|
fi
|
||||||
|
cp -v $CROSSLIBPATH/libstdc++-6.dll \
|
||||||
|
$CROSSLIBPATH/libgcc_s_sjlj-1.dll \
|
||||||
$prefix/bin
|
$prefix/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
13
config.sh.sample
Normal file → Executable file
13
config.sh.sample
Normal file → Executable 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
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export CROSSBUILD=i686-w64-mingw32
|
export CROSSBUILD=i686-w64-mingw32
|
||||||
export PATH=/opt/i686-w64-mingw32/bin:$PATH
|
export CROSSLIBPATH=/opt/mingw32/mingw/lib
|
||||||
|
export CROSSBINPATH=/opt/mingw32/mingw/bin
|
||||||
|
export PATH=/opt/mingw32/bin:$PATH
|
||||||
|
export PKG_CONFIG_PATH=$CROSSLIBPATH/pkgconfig
|
||||||
|
|||||||
7
cross-build-x86_64-w64-mingw32.sh
Executable file
7
cross-build-x86_64-w64-mingw32.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
export CROSSBUILD=x86_64-w64-mingw32
|
||||||
|
export CROSSLIBPATH=/opt/x86_64-mingw-w64/mingw/lib
|
||||||
|
export CROSSBINPATH=/opt/x86_64-mingw-w64/mingw/bin
|
||||||
|
export PATH=/opt/x86_64-mingw-w64/bin:$PATH
|
||||||
|
export PKG_CONFIG_PATH=$CROSSLIBPATH/pkgconfig
|
||||||
|
|
||||||
186
dkarm-eabi/crtls/3dsx.ld
Normal file
186
dkarm-eabi/crtls/3dsx.ld
Normal file
@@ -0,0 +1,186 @@
|
|||||||
|
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
||||||
|
OUTPUT_ARCH(arm)
|
||||||
|
ENTRY(_start)
|
||||||
|
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
code PT_LOAD FLAGS(5) /* Read | Execute */;
|
||||||
|
rodata PT_LOAD FLAGS(4) /* Read */;
|
||||||
|
data PT_LOAD FLAGS(6) /* Read | Write */;
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* =========== CODE section =========== */
|
||||||
|
|
||||||
|
PROVIDE(__start__ = 0x100000);
|
||||||
|
. = __start__;
|
||||||
|
|
||||||
|
.text ALIGN(0x1000) :
|
||||||
|
{
|
||||||
|
/* .init */
|
||||||
|
KEEP( *(.crt0) )
|
||||||
|
KEEP( *(.init) )
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
/* .text */
|
||||||
|
*(.text)
|
||||||
|
*(.text.*)
|
||||||
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
*(.stub)
|
||||||
|
*(.gnu.warning)
|
||||||
|
*(.gnu.linkonce.t*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
/* .fini */
|
||||||
|
KEEP( *(.fini) )
|
||||||
|
. = ALIGN(4);
|
||||||
|
} : code
|
||||||
|
|
||||||
|
/* =========== RODATA section =========== */
|
||||||
|
|
||||||
|
.rodata ALIGN(0x1000) :
|
||||||
|
{
|
||||||
|
*(.rodata)
|
||||||
|
*(.roda)
|
||||||
|
*(.rodata.*)
|
||||||
|
*all.rodata*(*)
|
||||||
|
*(.gnu.linkonce.r*)
|
||||||
|
SORT(CONSTRUCTORS)
|
||||||
|
. = ALIGN(4);
|
||||||
|
} : rodata
|
||||||
|
|
||||||
|
.ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } : rodata
|
||||||
|
__exidx_start = .;
|
||||||
|
ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } : rodata
|
||||||
|
__exidx_end = .;
|
||||||
|
|
||||||
|
/* =========== DATA section =========== */
|
||||||
|
|
||||||
|
.data ALIGN(0x1000) :
|
||||||
|
{
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
*(.gnu.linkonce.d*)
|
||||||
|
CONSTRUCTORS
|
||||||
|
. = ALIGN(4);
|
||||||
|
} : 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) :
|
||||||
|
{
|
||||||
|
PROVIDE (__preinit_array_start = .);
|
||||||
|
KEEP (*(.preinit_array))
|
||||||
|
PROVIDE (__preinit_array_end = .);
|
||||||
|
} : data
|
||||||
|
|
||||||
|
.init_array ALIGN(4) :
|
||||||
|
{
|
||||||
|
PROVIDE (__init_array_start = .);
|
||||||
|
KEEP (*(SORT(.init_array.*)))
|
||||||
|
KEEP (*(.init_array))
|
||||||
|
PROVIDE (__init_array_end = .);
|
||||||
|
} : data
|
||||||
|
|
||||||
|
.fini_array ALIGN(4) :
|
||||||
|
{
|
||||||
|
PROVIDE (__fini_array_start = .);
|
||||||
|
KEEP (*(.fini_array))
|
||||||
|
KEEP (*(SORT(.fini_array.*)))
|
||||||
|
PROVIDE (__fini_array_end = .);
|
||||||
|
} : data
|
||||||
|
|
||||||
|
.ctors ALIGN(4) :
|
||||||
|
{
|
||||||
|
KEEP (*crtbegin.o(.ctors)) /* MUST be first -- GCC requires it */
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend.o) .ctors))
|
||||||
|
KEEP (*(SORT(.ctors.*)))
|
||||||
|
KEEP (*(.ctors))
|
||||||
|
} : data
|
||||||
|
|
||||||
|
.dtors ALIGN(4) :
|
||||||
|
{
|
||||||
|
KEEP (*crtbegin.o(.dtors))
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend.o) .dtors))
|
||||||
|
KEEP (*(SORT(.dtors.*)))
|
||||||
|
KEEP (*(.dtors))
|
||||||
|
} : data
|
||||||
|
|
||||||
|
__bss_start__ = .;
|
||||||
|
.bss ALIGN(4) :
|
||||||
|
{
|
||||||
|
*(.dynbss)
|
||||||
|
*(.bss)
|
||||||
|
*(.bss.*)
|
||||||
|
*(.gnu.linkonce.b*)
|
||||||
|
*(COMMON)
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
/* Reserve space for the TLS segment of the main thread */
|
||||||
|
__tls_start = .;
|
||||||
|
. += + SIZEOF(.tdata) + SIZEOF(.tbss);
|
||||||
|
__tls_end = .;
|
||||||
|
} : data
|
||||||
|
__bss_end__ = .;
|
||||||
|
|
||||||
|
__end__ = ABSOLUTE(.) ;
|
||||||
|
|
||||||
|
/* ==================
|
||||||
|
==== Metadata ====
|
||||||
|
================== */
|
||||||
|
|
||||||
|
/* Discard sections that difficult post-processing */
|
||||||
|
/DISCARD/ : { *(.group .comment .note) }
|
||||||
|
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
|
||||||
|
/* DWARF debug sections.
|
||||||
|
Symbols in the DWARF debugging sections are relative to the beginning
|
||||||
|
of the section so we begin them at 0. */
|
||||||
|
|
||||||
|
/* DWARF 1 */
|
||||||
|
.debug 0 : { *(.debug) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
}
|
||||||
8
dkarm-eabi/crtls/3dsx.specs
Normal file
8
dkarm-eabi/crtls/3dsx.specs
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
%rename link old_link
|
||||||
|
|
||||||
|
*link:
|
||||||
|
%(old_link) -T 3dsx.ld%s -d --emit-relocs --use-blx --gc-sections
|
||||||
|
|
||||||
|
*startfile:
|
||||||
|
3dsx_crt0%O%s crti%O%s crtbegin%O%s
|
||||||
|
|
||||||
73
dkarm-eabi/crtls/3dsx_crt0.s
Normal file
73
dkarm-eabi/crtls/3dsx_crt0.s
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
@ 3DS processor selection
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
.cpu mpcore
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
.section ".crt0"
|
||||||
|
.global _start, __service_ptr, __apt_appid, __heap_size, __linear_heap_size, __system_arglist, __system_runflags
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
.align 2
|
||||||
|
.arm
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
_start:
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
b startup
|
||||||
|
.ascii "_prm"
|
||||||
|
__service_ptr:
|
||||||
|
.word 0 @ Pointer to service handle override list -- if non-NULL it is assumed that we have been launched from a homebrew launcher
|
||||||
|
__apt_appid:
|
||||||
|
.word 0x300 @ Program APPID
|
||||||
|
__heap_size:
|
||||||
|
.word 24*1024*1024 @ Default heap size (24 MiB)
|
||||||
|
__linear_heap_size:
|
||||||
|
.word 32*1024*1024 @ Default linear heap size (32 MiB)
|
||||||
|
__system_arglist:
|
||||||
|
.word 0 @ Pointer to argument list (argc (u32) followed by that many NULL terminated strings)
|
||||||
|
__system_runflags:
|
||||||
|
.word 0 @ Flags to signal runtime restrictions to ctrulib
|
||||||
|
startup:
|
||||||
|
@ Save return address
|
||||||
|
mov r4, lr
|
||||||
|
|
||||||
|
@ Clear the BSS section
|
||||||
|
ldr r0, =__bss_start__
|
||||||
|
ldr r1, =__bss_end__
|
||||||
|
sub r1, r1, r0
|
||||||
|
bl ClearMem
|
||||||
|
|
||||||
|
@ System initialization
|
||||||
|
mov r0, r4
|
||||||
|
bl initSystem
|
||||||
|
|
||||||
|
@ Set up argc/argv arguments for main()
|
||||||
|
ldr r0, =__system_argc
|
||||||
|
ldr r1, =__system_argv
|
||||||
|
ldr r0, [r0]
|
||||||
|
ldr r1, [r1]
|
||||||
|
|
||||||
|
@ Jump to user code
|
||||||
|
ldr r3, =main
|
||||||
|
ldr lr, =__ctru_exit
|
||||||
|
bx r3
|
||||||
|
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
@ Clear memory to 0x00 if length != 0
|
||||||
|
@ r0 = Start Address
|
||||||
|
@ r1 = Length
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
ClearMem:
|
||||||
|
@---------------------------------------------------------------------------------
|
||||||
|
mov r2, #3 @ Round down to nearest word boundary
|
||||||
|
add r1, r1, r2 @ Shouldn't be needed
|
||||||
|
bics r1, r1, r2 @ Clear 2 LSB (and set Z)
|
||||||
|
bxeq lr @ Quit if copy size is 0
|
||||||
|
|
||||||
|
mov r2, #0
|
||||||
|
ClrLoop:
|
||||||
|
stmia r0!, {r2}
|
||||||
|
subs r1, r1, #4
|
||||||
|
bne ClrLoop
|
||||||
|
|
||||||
|
bx lr
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -1,162 +0,0 @@
|
|||||||
diff -Nbaur binutils-2.22/bfd/bfd-in2.h binutils-2.22-arm/bfd/bfd-in2.h
|
|
||||||
--- binutils-2.22/bfd/bfd-in2.h 2011-09-16 02:15:18.000000000 +0100
|
|
||||||
+++ binutils-2.22-arm/bfd/bfd-in2.h 2012-04-01 12:58:20.000000000 +0100
|
|
||||||
@@ -38,6 +38,8 @@
|
|
||||||
|
|
||||||
#include "ansidecl.h"
|
|
||||||
#include "symcat.h"
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+
|
|
||||||
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
|
|
||||||
#ifndef SABER
|
|
||||||
/* This hack is to avoid a problem with some strict ANSI C preprocessors.
|
|
||||||
@@ -308,8 +310,6 @@
|
|
||||||
&& (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
|
|
||||||
&& (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
|
|
||||||
|
|
||||||
-/* Forward define. */
|
|
||||||
-struct stat;
|
|
||||||
|
|
||||||
typedef enum bfd_print_symbol
|
|
||||||
{
|
|
||||||
diff -Nbaur binutils-2.22/bfd/bfd-in.h binutils-2.22-arm/bfd/bfd-in.h
|
|
||||||
--- binutils-2.22/bfd/bfd-in.h 2011-09-16 02:15:18.000000000 +0100
|
|
||||||
+++ binutils-2.22-arm/bfd/bfd-in.h 2012-04-01 12:58:20.000000000 +0100
|
|
||||||
@@ -31,6 +31,8 @@
|
|
||||||
|
|
||||||
#include "ansidecl.h"
|
|
||||||
#include "symcat.h"
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+
|
|
||||||
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
|
|
||||||
#ifndef SABER
|
|
||||||
/* This hack is to avoid a problem with some strict ANSI C preprocessors.
|
|
||||||
@@ -301,8 +303,6 @@
|
|
||||||
&& (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
|
|
||||||
&& (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
|
|
||||||
|
|
||||||
-/* Forward define. */
|
|
||||||
-struct stat;
|
|
||||||
|
|
||||||
typedef enum bfd_print_symbol
|
|
||||||
{
|
|
||||||
diff -Nbaur binutils-2.22/bfd/config.in binutils-2.22-arm/bfd/config.in
|
|
||||||
--- binutils-2.22/bfd/config.in 2011-05-12 08:41:40.000000000 +0100
|
|
||||||
+++ binutils-2.22-arm/bfd/config.in 2012-04-03 17:35:45.000000000 +0100
|
|
||||||
@@ -245,6 +245,9 @@
|
|
||||||
/* Define if <sys/procfs.h> has win32_pstatus_t. */
|
|
||||||
#undef HAVE_WIN32_PSTATUS_T
|
|
||||||
|
|
||||||
+/* Define to 1 if you have the <windows.h> header file. */
|
|
||||||
+#undef HAVE_WINDOWS_H
|
|
||||||
+
|
|
||||||
/* Define to 1 if you have the <zlib.h> header file. */
|
|
||||||
#undef HAVE_ZLIB_H
|
|
||||||
|
|
||||||
diff -Nbaur binutils-2.22/bfd/configure binutils-2.22-arm/bfd/configure
|
|
||||||
--- binutils-2.22/bfd/configure 2011-11-21 11:55:48.000000000 +0000
|
|
||||||
+++ binutils-2.22-arm/bfd/configure 2012-04-03 17:35:45.000000000 +0100
|
|
||||||
@@ -13508,6 +13508,22 @@
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
+
|
|
||||||
+for ac_header in windows.h dlfcn.h
|
|
||||||
+do :
|
|
||||||
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
|
||||||
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
|
||||||
+eval as_val=\$$as_ac_Header
|
|
||||||
+ if test "x$as_val" = x""yes; then :
|
|
||||||
+ cat >>confdefs.h <<_ACEOF
|
|
||||||
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
|
||||||
+_ACEOF
|
|
||||||
+
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+done
|
|
||||||
+
|
|
||||||
+
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
|
|
||||||
$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
|
|
||||||
if test "${gcc_cv_header_string+set}" = set; then :
|
|
||||||
diff -Nbaur binutils-2.22/bfd/configure.in binutils-2.22-arm/bfd/configure.in
|
|
||||||
--- binutils-2.22/bfd/configure.in 2011-11-21 11:55:46.000000000 +0000
|
|
||||||
+++ binutils-2.22-arm/bfd/configure.in 2012-04-03 17:35:45.000000000 +0100
|
|
||||||
@@ -190,6 +190,9 @@
|
|
||||||
GCC_HEADER_STDINT(bfd_stdint.h)
|
|
||||||
AC_HEADER_TIME
|
|
||||||
AC_HEADER_DIRENT
|
|
||||||
+
|
|
||||||
+AC_CHECK_HEADERS(windows.h dlfcn.h)
|
|
||||||
+
|
|
||||||
ACX_HEADER_STRING
|
|
||||||
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno)
|
|
||||||
AC_CHECK_FUNCS(strtoull)
|
|
||||||
diff -Nbaur binutils-2.22/bfd/plugin.c binutils-2.22-arm/bfd/plugin.c
|
|
||||||
--- binutils-2.22/bfd/plugin.c 2011-07-11 16:03:07.000000000 +0100
|
|
||||||
+++ binutils-2.22-arm/bfd/plugin.c 2012-04-03 17:35:45.000000000 +0100
|
|
||||||
@@ -25,7 +25,13 @@
|
|
||||||
#if BFD_SUPPORTS_PLUGINS
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
+#ifdef HAVE_DLFCN_H
|
|
||||||
#include <dlfcn.h>
|
|
||||||
+#elif defined (HAVE_WINDOWS_H)
|
|
||||||
+#include <windows.h>
|
|
||||||
+#else
|
|
||||||
+#error Unknown how to handle dynamic-load-libraries.
|
|
||||||
+#endif
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include "plugin-api.h"
|
|
||||||
#include "sysdep.h"
|
|
||||||
@@ -34,6 +40,37 @@
|
|
||||||
#include "libiberty.h"
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
+#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
|
|
||||||
+
|
|
||||||
+#define RTLD_NOW 0 /* Dummy value. */
|
|
||||||
+
|
|
||||||
+static void *
|
|
||||||
+dlopen (const char *file, int mode ATTRIBUTE_UNUSED)
|
|
||||||
+{
|
|
||||||
+ return LoadLibrary (file);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void *
|
|
||||||
+dlsym (void *handle, const char *name)
|
|
||||||
+{
|
|
||||||
+ return GetProcAddress (handle, name);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int ATTRIBUTE_UNUSED
|
|
||||||
+dlclose (void *handle)
|
|
||||||
+{
|
|
||||||
+ FreeLibrary (handle);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const char *
|
|
||||||
+dlerror (void)
|
|
||||||
+{
|
|
||||||
+ return "Unable to load DLL.";
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#endif /* !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H) */
|
|
||||||
+
|
|
||||||
#define bfd_plugin_close_and_cleanup _bfd_generic_close_and_cleanup
|
|
||||||
#define bfd_plugin_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
|
|
||||||
#define bfd_plugin_new_section_hook _bfd_generic_new_section_hook
|
|
||||||
diff -Nbaur binutils-2.22/include/opcode/arm.h binutils-2.22-arm/include/opcode/arm.h
|
|
||||||
--- binutils-2.22/include/opcode/arm.h 2011-05-31 15:12:55.000000000 +0100
|
|
||||||
+++ binutils-2.22-arm/include/opcode/arm.h 2012-04-01 12:58:20.000000000 +0100
|
|
||||||
@@ -109,7 +109,8 @@
|
|
||||||
#define ARM_AEXT_V6KT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K)
|
|
||||||
#define ARM_AEXT_V6ZT2 (ARM_AEXT_V6T2 | ARM_EXT_SEC)
|
|
||||||
#define ARM_AEXT_V6ZKT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K | ARM_EXT_SEC)
|
|
||||||
-#define ARM_AEXT_V7_ARM (ARM_AEXT_V6KT2 | ARM_EXT_V7 | ARM_EXT_BARRIER)
|
|
||||||
+#define ARM_AEXT_V7_ARM (ARM_AEXT_V6KT2 | ARM_EXT_V7 | ARM_EXT_BARRIER \
|
|
||||||
+ | ARM_EXT_OS )
|
|
||||||
#define ARM_AEXT_V7A (ARM_AEXT_V7_ARM | ARM_EXT_V7A)
|
|
||||||
#define ARM_AEXT_V7R (ARM_AEXT_V7_ARM | ARM_EXT_V7R | ARM_EXT_DIV)
|
|
||||||
#define ARM_AEXT_NOTM \
|
|
||||||
13
dkarm-eabi/patches/binutils-2.25.1.patch
Normal file
13
dkarm-eabi/patches/binutils-2.25.1.patch
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
diff -Nbaur binutils-2.24/include/opcode/arm.h binutils-2.24-arm/include/opcode/arm.h
|
||||||
|
--- binutils-2.24/include/opcode/arm.h 2013-11-26 11:37:33.000000000 +0000
|
||||||
|
+++ binutils-2.24-arm/include/opcode/arm.h 2014-02-16 19:32:33.000000000 +0000
|
||||||
|
@@ -114,7 +114,8 @@
|
||||||
|
#define ARM_AEXT_V6KT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K)
|
||||||
|
#define ARM_AEXT_V6ZT2 (ARM_AEXT_V6T2 | ARM_EXT_SEC)
|
||||||
|
#define ARM_AEXT_V6ZKT2 (ARM_AEXT_V6T2 | ARM_EXT_V6K | ARM_EXT_SEC)
|
||||||
|
-#define ARM_AEXT_V7_ARM (ARM_AEXT_V6KT2 | ARM_EXT_V7 | ARM_EXT_BARRIER)
|
||||||
|
+#define ARM_AEXT_V7_ARM (ARM_AEXT_V6KT2 | ARM_EXT_V7 | ARM_EXT_BARRIER \
|
||||||
|
+ | ARM_EXT_OS )
|
||||||
|
#define ARM_AEXT_V7A (ARM_AEXT_V7_ARM | ARM_EXT_V7A)
|
||||||
|
#define ARM_AEXT_V7VE (ARM_AEXT_V7A | ARM_EXT_DIV | ARM_EXT_ADIV \
|
||||||
|
| ARM_EXT_VIRT | ARM_EXT_SEC | ARM_EXT_MP)
|
||||||
@@ -1,167 +0,0 @@
|
|||||||
diff -Nbaur gcc-4.7.0/gcc/config/arm/t-arm-elf gcc-4.7.0-arm/gcc/config/arm/t-arm-elf
|
|
||||||
--- gcc-4.7.0/gcc/config/arm/t-arm-elf 2011-11-02 15:23:48.000000000 +0000
|
|
||||||
+++ gcc-4.7.0-arm/gcc/config/arm/t-arm-elf 2012-04-05 20:36:17.000000000 +0100
|
|
||||||
@@ -26,22 +26,44 @@
|
|
||||||
#MULTILIB_DIRNAMES += fa526 fa626 fa606te fa626te fmp626 fa726te
|
|
||||||
#MULTILIB_EXCEPTIONS += *mthumb*/*mcpu=fa526 *mthumb*/*mcpu=fa626
|
|
||||||
|
|
||||||
-#MULTILIB_OPTIONS += march=armv7
|
|
||||||
-#MULTILIB_DIRNAMES += thumb2
|
|
||||||
-#MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
|
|
||||||
-#MULTILIB_MATCHES += march?armv7=march?armv7-a
|
|
||||||
-#MULTILIB_MATCHES += march?armv7=march?armv7-r
|
|
||||||
-#MULTILIB_MATCHES += march?armv7=march?armv7-m
|
|
||||||
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
|
|
||||||
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
|
|
||||||
-#MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
|
|
||||||
+#mfloat-abi=hard|mfpu=fpv4-sp-d16
|
|
||||||
+
|
|
||||||
+MULTILIB_OPTIONS += march=armv7/march=armv6-m/mcpu=cortex-m4
|
|
||||||
+MULTILIB_DIRNAMES += thumb2 armv6-m cortex-m4
|
|
||||||
+MULTILIB_EXCEPTIONS += march=armv7* marm/*march=armv7*
|
|
||||||
+MULTILIB_EXCEPTIONS += march=armv6-m* marm/*march=armv6-m*
|
|
||||||
+MULTILIB_EXCEPTIONS += mcpu=cortex-m4* marm/*mcpu=cortex-m4*
|
|
||||||
+MULTILIB_EXCEPTIONS += mcpu=cortex-m4* mthumb/mcpu=cortex-m4
|
|
||||||
+MULTILIB_EXCEPTIONS += mcpu=cortex-m4* mthumb/mcpu=cortex-m4/mbig-endian
|
|
||||||
+MULTILIB_MATCHES += march?armv7=march?armv7-a
|
|
||||||
+MULTILIB_MATCHES += march?armv7=march?armv7-r
|
|
||||||
+MULTILIB_MATCHES += march?armv7=march?armv7-m
|
|
||||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-a8
|
|
||||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-r4
|
|
||||||
+MULTILIB_MATCHES += march?armv7=mcpu?cortex-m3
|
|
||||||
+MULTILIB_MATCHES += march?armv6-m=mcpu?cortex-m0
|
|
||||||
+MULTILIB_MATCHES += march?armv6-m=mcpu?cortex-m1
|
|
||||||
+
|
|
||||||
+MULTILIB_OPTIONS += mfloat-abi=hard mfpu=fpv4-sp-d16
|
|
||||||
+MULTILIB_DIRNAMES += float-abi-hard fpuv4-sp-d16
|
|
||||||
+MULTILIB_EXCEPTIONS += mfloat* marm/mfloat*
|
|
||||||
+MULTILIB_EXCEPTIONS += mfloat* mthumb/mfloat*
|
|
||||||
+MULTILIB_EXCEPTIONS += mfloat* mthumb*march=armv6-m*mfloat*
|
|
||||||
+MULTILIB_EXCEPTIONS += mfloat* mthumb*march=armv7*mfloat*
|
|
||||||
+MULTILIB_EXCEPTIONS += mfloat* mthumb/mcpu=cortex-m4/mfloat-abi=hard
|
|
||||||
+MULTILIB_EXCEPTIONS += mfloat* mthumb/mcpu=cortex-m4/mfloat-abi=hard/mbig-endian
|
|
||||||
+MULTILIB_EXCEPTIONS += mfpu* mthumb*march=armv6-m*mfpu*
|
|
||||||
+MULTILIB_EXCEPTIONS += mfpu* mthumb*march=armv7*mfpu*
|
|
||||||
+MULTILIB_EXCEPTIONS += mfpu* mthumb/mcpu=cortex-m4/mfpu*
|
|
||||||
+MULTILIB_EXCEPTIONS += mfpu* mthumb/mfpu*
|
|
||||||
+MULTILIB_EXCEPTIONS += mfpu* marm/mfpu*
|
|
||||||
|
|
||||||
# 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*
|
|
||||||
|
|
||||||
@@ -49,9 +71,9 @@
|
|
||||||
# MULTILIB_DIRNAMES += ep9312
|
|
||||||
# MULTILIB_EXCEPTIONS += *mthumb/*mcpu=ep9312*
|
|
||||||
#
|
|
||||||
-# MULTILIB_OPTIONS += mlittle-endian/mbig-endian
|
|
||||||
-# MULTILIB_DIRNAMES += le be
|
|
||||||
-# MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle
|
|
||||||
+MULTILIB_OPTIONS += mlittle-endian/mbig-endian
|
|
||||||
+MULTILIB_DIRNAMES += le be
|
|
||||||
+MULTILIB_MATCHES += mbig-endian=mbe mlittle-endian=mle
|
|
||||||
#
|
|
||||||
# MULTILIB_OPTIONS += mfloat-abi=hard/mfloat-abi=soft
|
|
||||||
# MULTILIB_DIRNAMES += fpu soft
|
|
||||||
diff -Nbaur gcc-4.7.0/gcc/config/arm/unknown-elf.h gcc-4.7.0-arm/gcc/config/arm/unknown-elf.h
|
|
||||||
--- gcc-4.7.0/gcc/config/arm/unknown-elf.h 2011-03-31 13:13:13.000000000 +0100
|
|
||||||
+++ gcc-4.7.0-arm/gcc/config/arm/unknown-elf.h 2012-04-05 20:36:17.000000000 +0100
|
|
||||||
@@ -94,4 +94,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-4.7.0/gcc/gcc.c gcc-4.7.0-arm/gcc/gcc.c
|
|
||||||
--- gcc-4.7.0/gcc/gcc.c 2012-02-28 17:31:38.000000000 +0000
|
|
||||||
+++ gcc-4.7.0-arm/gcc/gcc.c 2012-04-05 20:36:17.000000000 +0100
|
|
||||||
@@ -548,6 +548,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 \
|
|
||||||
@@ -717,6 +722,7 @@
|
|
||||||
static const char *mflib_spec = MFLIB_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;
|
|
||||||
@@ -1201,6 +1207,7 @@
|
|
||||||
INIT_STATIC_SPEC ("mflib", &mflib_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-4.7.0/libcpp/Makefile.in gcc-4.7.0-arm/libcpp/Makefile.in
|
|
||||||
--- gcc-4.7.0/libcpp/Makefile.in 2012-03-22 07:37:39.000000000 +0000
|
|
||||||
+++ gcc-4.7.0-arm/libcpp/Makefile.in 2012-04-05 20:36:17.000000000 +0100
|
|
||||||
@@ -214,8 +214,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-4.7.0/libgcc/crtstuff.c gcc-4.7.0-arm/libgcc/crtstuff.c
|
|
||||||
--- gcc-4.7.0/libgcc/crtstuff.c 2011-12-06 21:35:41.000000000 +0000
|
|
||||||
+++ gcc-4.7.0-arm/libgcc/crtstuff.c 2012-04-05 20:36:50.000000000 +0100
|
|
||||||
@@ -49,7 +49,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-4.7.0/libgcc/Makefile.in gcc-4.7.0-arm/libgcc/Makefile.in
|
|
||||||
--- gcc-4.7.0/libgcc/Makefile.in 2011-11-22 03:01:02.000000000 +0000
|
|
||||||
+++ gcc-4.7.0-arm/libgcc/Makefile.in 2012-04-05 20:36:17.000000000 +0100
|
|
||||||
@@ -500,14 +500,14 @@
|
|
||||||
lib2-divmod-o = $(patsubst %,%$(objext),$(LIB2_DIVMOD_FUNCS))
|
|
||||||
$(lib2-divmod-o): %$(objext): $(srcdir)/libgcc2.c
|
|
||||||
$(gcc_compile) -DL$* -c $< \
|
|
||||||
- -fexceptions -fnon-call-exceptions $(vis_hide)
|
|
||||||
+ -fno-exceptions -fnon-call-exceptions $(vis_hide)
|
|
||||||
libgcc-objects += $(lib2-divmod-o)
|
|
||||||
|
|
||||||
ifeq ($(enable_shared),yes)
|
|
||||||
lib2-divmod-s-o = $(patsubst %,%_s$(objext),$(LIB2_DIVMOD_FUNCS))
|
|
||||||
$(lib2-divmod-s-o): %_s$(objext): $(srcdir)/libgcc2.c
|
|
||||||
$(gcc_s_compile) -DL$* -c $< \
|
|
||||||
- -fexceptions -fnon-call-exceptions
|
|
||||||
+ -fno-exceptions -fnon-call-exceptions
|
|
||||||
libgcc-s-objects += $(lib2-divmod-s-o)
|
|
||||||
endif
|
|
||||||
|
|
||||||
@@ -810,7 +810,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)
|
|
||||||
|
|
||||||
147
dkarm-eabi/patches/gcc-5.3.0.patch
Normal file
147
dkarm-eabi/patches/gcc-5.3.0.patch
Normal 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)
|
||||||
|
|
||||||
@@ -1,25 +1,7 @@
|
|||||||
diff -Nbaur gdb-7.4/gdb/Makefile.in gdb-7.4-arm/gdb/Makefile.in
|
diff -NBaur gdb-7.10/gdb/Makefile.in gdb-7.10-arm/gdb/Makefile.in
|
||||||
--- gdb-7.4/gdb/Makefile.in 2012-01-06 04:43:01.000000000 +0000
|
--- gdb-7.10/gdb/Makefile.in 2015-08-28 22:22:07.000000000 +0100
|
||||||
+++ gdb-7.4-arm/gdb/Makefile.in 2012-02-28 03:07:12.000000000 +0000
|
+++ gdb-7.10-arm/gdb/Makefile.in 2015-10-21 08:54:36.492597858 +0100
|
||||||
@@ -2195,10 +2195,10 @@
|
@@ -2676,10 +2676,8 @@
|
||||||
# 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.
|
|
||||||
-@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
|
|
||||||
-@GMAKE_TRUE@ -MF $(DEPDIR)/$(basename $(@F)).Tpo
|
|
||||||
-@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
|
|
||||||
-@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po
|
|
||||||
+#@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
|
|
||||||
+#@GMAKE_TRUE@ -MF $(DEPDIR)/$(basename $(@F)).Tpo
|
|
||||||
+#@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
|
|
||||||
+#@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po
|
|
||||||
@GMAKE_TRUE@else
|
|
||||||
@GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \
|
|
||||||
@GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
|
|
||||||
diff -Nbaur gdb-7.4/sim/common/Make-common.in gdb-7.4-arm/sim/common/Make-common.in
|
|
||||||
--- gdb-7.4/sim/common/Make-common.in 2012-01-06 04:54:38.000000000 +0000
|
|
||||||
+++ gdb-7.4-arm/sim/common/Make-common.in 2012-02-28 03:07:41.000000000 +0000
|
|
||||||
@@ -417,10 +417,7 @@
|
|
||||||
# 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.
|
||||||
@@ -28,6 +10,23 @@ diff -Nbaur gdb-7.4/sim/common/Make-common.in gdb-7.4-arm/sim/common/Make-common
|
|||||||
-@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
|
-@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
|
||||||
-@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po
|
-@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po
|
||||||
+@GMAKE_TRUE@override COMPILE.post = -c -o $@
|
+@GMAKE_TRUE@override COMPILE.post = -c -o $@
|
||||||
|
+@GMAKE_TRUE@override POSTCOMPILE =
|
||||||
|
@GMAKE_TRUE@else
|
||||||
|
@GMAKE_TRUE@override COMPILE.pre = source='$<' object='$@' libtool=no \
|
||||||
|
@GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
|
||||||
|
diff -NBaur gdb-7.10/sim/common/Make-common.in gdb-7.10-arm/sim/common/Make-common.in
|
||||||
|
--- gdb-7.10/sim/common/Make-common.in 2015-07-06 20:57:46.000000000 +0100
|
||||||
|
+++ gdb-7.10-arm/sim/common/Make-common.in 2015-10-21 08:54:36.492597858 +0100
|
||||||
|
@@ -421,10 +421,8 @@
|
||||||
|
# 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.
|
||||||
|
-@GMAKE_TRUE@override COMPILE.post = -c -o $@ -MT $@ -MMD -MP \
|
||||||
|
-@GMAKE_TRUE@ -MF $(DEPDIR)/$(basename $(@F)).Tpo
|
||||||
|
-@GMAKE_TRUE@override POSTCOMPILE = @mv $(DEPDIR)/$(basename $(@F)).Tpo \
|
||||||
|
-@GMAKE_TRUE@ $(DEPDIR)/$(basename $(@F)).Po
|
||||||
|
+@GMAKE_TRUE@override COMPILE.post = -c -o $@
|
||||||
|
+@GMAKE_TRUE@override POSTCOMPILE =
|
||||||
@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)
|
||||||
File diff suppressed because it is too large
Load Diff
41
dkarm-eabi/rules/3ds_rules
Normal file
41
dkarm-eabi/rules/3ds_rules
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
ifeq ($(strip $(DEVKITPRO)),)
|
||||||
|
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
|
||||||
|
endif
|
||||||
|
|
||||||
|
include $(DEVKITARM)/base_rules
|
||||||
|
|
||||||
|
PORTLIBS := $(PORTLIBS_PATH)/armv6k $(PORTLIBS_PATH)/3ds
|
||||||
|
|
||||||
|
CTRULIB ?= $(DEVKITPRO)/libctru
|
||||||
|
|
||||||
|
ifeq ($(strip $(APP_TITLE)),)
|
||||||
|
APP_TITLE := $(notdir $(OUTPUT))
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(APP_DESCRIPTION)),)
|
||||||
|
APP_DESCRIPTION := Built with devkitARM & libctru
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(APP_AUTHOR)),)
|
||||||
|
APP_AUTHOR := Unspecified Author
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(APP_ICON)),)
|
||||||
|
APP_ICON := $(CTRULIB)/default_icon.png
|
||||||
|
endif
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
%.smdh: $(APP_ICON) $(MAKEFILE_LIST)
|
||||||
|
@smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||||
|
@echo built ... $(notdir $@)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
%.3dsx: %.elf
|
||||||
|
@3dsxtool $< $@ $(_3DSXFLAGS)
|
||||||
|
@echo built ... $(notdir $@)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
%.elf:
|
||||||
|
@echo linking $(notdir $@)
|
||||||
|
@$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
|
||||||
|
@$(NM) -CSn $@ > $(notdir $*.lst)
|
||||||
@@ -1,36 +1,10 @@
|
|||||||
#---------------------------------------------------------------------------------
|
include $(DEVKITARM)/base_tools
|
||||||
# change shell on Snow Leopard
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
UNAME_S := $(shell uname -s)
|
|
||||||
UNAME_R := $(shell uname -r)
|
|
||||||
|
|
||||||
ifneq (,$(findstring Darwin,$(UNAME_S)))
|
|
||||||
ifneq (,$(findstring 10.8.0,$(UNAME_R)))
|
|
||||||
export SHELL=/bin/bash
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
# path to tools
|
|
||||||
#---------------------------------------------------------------------------------
|
|
||||||
export PORTLIBS := $(DEVKITPRO)/portlibs/arm
|
|
||||||
export PATH := $(DEVKITARM)/bin:$(PORTLIBS)/bin:$(PATH)
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# the prefix on the compiler executables
|
# add portlibs path
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
PREFIX := arm-eabi-
|
export PORTLIBS_PATH := $(DEVKITPRO)/portlibs
|
||||||
|
|
||||||
export CC := $(PREFIX)gcc
|
|
||||||
export CXX := $(PREFIX)g++
|
|
||||||
export AS := $(PREFIX)as
|
|
||||||
export AR := $(PREFIX)ar
|
|
||||||
export OBJCOPY := $(PREFIX)objcopy
|
|
||||||
|
|
||||||
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
|
|
||||||
|
|
||||||
ifneq (,$(ISVC))
|
|
||||||
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
|
|
||||||
endif
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
%.a:
|
%.a:
|
||||||
@@ -43,7 +17,7 @@ endif
|
|||||||
%.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 $<)
|
||||||
@@ -58,7 +32,7 @@ endif
|
|||||||
%.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 $<)
|
||||||
@@ -73,7 +47,7 @@ endif
|
|||||||
%.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 $<)
|
||||||
@@ -88,7 +62,7 @@ endif
|
|||||||
%.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 $<)
|
||||||
@@ -104,7 +78,7 @@ endif
|
|||||||
%.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 $<)
|
||||||
|
|||||||
33
dkarm-eabi/rules/base_tools
Normal file
33
dkarm-eabi/rules/base_tools
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# make sure we have bash on OSX
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
UNAME_S := $(shell uname -s)
|
||||||
|
UNAME_R := $(shell uname -r)
|
||||||
|
|
||||||
|
ifneq (,$(findstring Darwin,$(UNAME_S)))
|
||||||
|
export SHELL=/bin/bash
|
||||||
|
endif
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# path to tools
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
export PATH := $(DEVKITARM)/bin:$(PATH)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# the prefix on the compiler executables
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
PREFIX := arm-none-eabi-
|
||||||
|
|
||||||
|
export CC := $(PREFIX)gcc
|
||||||
|
export CXX := $(PREFIX)g++
|
||||||
|
export AS := $(PREFIX)as
|
||||||
|
export AR := $(PREFIX)gcc-ar
|
||||||
|
export OBJCOPY := $(PREFIX)objcopy
|
||||||
|
export STRIP := $(PREFIX)strip
|
||||||
|
export NM := $(PREFIX)gcc-nm
|
||||||
|
export RANLIB := $(PREFIX)gcc-ranlib
|
||||||
|
|
||||||
|
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
|
||||||
|
|
||||||
|
ifneq (,$(ISVC))
|
||||||
|
ERROR_FILTER := 2>&1 | sed -e 's/\(.[a-zA-Z]\+\):\([0-9]\+\):/\1(\2):/g'
|
||||||
|
endif
|
||||||
@@ -4,18 +4,20 @@ 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))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(GAME_SUBTITLE1)),)
|
ifeq ($(strip $(GAME_SUBTITLE1)),)
|
||||||
GAME_SUBTITLE1 := www.devkitpro.org
|
GAME_SUBTITLE1 := built with devkitARM
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(GAME_SUBTITLE2)),)
|
ifeq ($(strip $(GAME_SUBTITLE2)),)
|
||||||
GAME_SUBTITLE2 := www.drunkencoders.com
|
GAME_SUBTITLE2 := http://devkitpro.org
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(strip $(GAME_ICON)),)
|
ifeq ($(strip $(GAME_ICON)),)
|
||||||
@@ -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 $< $@
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ cp -v $BUILDSCRIPTDIR/dkarm-eabi/rules/* $prefix
|
|||||||
# Install and build the gba crt
|
# Install and build the gba crt
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
cp -v $BUILDSCRIPTDIR/dkarm-eabi/crtls/* $prefix/arm-eabi/lib/
|
cp -v $BUILDSCRIPTDIR/dkarm-eabi/crtls/* $prefix/$target/lib/
|
||||||
cd $prefix/arm-eabi/lib/
|
cd $prefix/$target/lib/
|
||||||
$MAKE CRT=gba
|
$MAKE CRT=gba
|
||||||
$MAKE CRT=gp32
|
$MAKE CRT=gp32
|
||||||
$MAKE CRT=er
|
$MAKE CRT=er
|
||||||
@@ -21,12 +21,25 @@ $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
|
||||||
|
$target-gcc -march=armv6k -mfloat-abi=hard -c 3dsx_crt0.s -o armv6k/fpu/3dsx_crt0.o
|
||||||
|
|
||||||
|
cd $BUILDDIR/libgba-$LIBGBA_VER
|
||||||
|
$MAKE || { echo "error building libgba"; exit 1; }
|
||||||
|
$MAKE install || { echo "error installing libgba"; exit 1; }
|
||||||
|
|
||||||
cd $BUILDDIR/libnds-$LIBNDS_VER
|
cd $BUILDDIR/libnds-$LIBNDS_VER
|
||||||
$MAKE || { echo "error building libnds"; exit 1; }
|
$MAKE || { echo "error building libnds"; exit 1; }
|
||||||
$MAKE install || { echo "error installing libnds"; exit 1; }
|
$MAKE install || { echo "error installing libnds"; exit 1; }
|
||||||
|
|
||||||
cd $BUILDDIR/default-arm7-$DEFAULT_ARM7_VER
|
cd $BUILDDIR/dswifi-$DSWIFI_VER
|
||||||
|
$MAKE || { echo "error building dswifi"; exit 1; }
|
||||||
|
$MAKE install || { echo "error installing dswifi"; exit 1; }
|
||||||
|
|
||||||
|
cd $BUILDDIR/maxmod-$MAXMOD_VER
|
||||||
|
$MAKE || { echo "error building maxmod"; exit 1; }
|
||||||
|
$MAKE install || { echo "error installing maxmod"; exit 1; }
|
||||||
|
|
||||||
|
cd $BUILDDIR/default_arm7-$DEFAULT_ARM7_VER
|
||||||
$MAKE || { echo "error building default arm7"; exit 1; }
|
$MAKE || { echo "error building default arm7"; exit 1; }
|
||||||
$MAKE install || { echo "error installing default arm7"; exit 1; }
|
$MAKE install || { echo "error installing default arm7"; exit 1; }
|
||||||
|
|
||||||
@@ -34,10 +47,6 @@ cd $BUILDDIR/libfat-$LIBFAT_VER
|
|||||||
$MAKE nds-install || { echo "error building nds libfat"; exit 1; }
|
$MAKE nds-install || { echo "error building nds libfat"; exit 1; }
|
||||||
$MAKE gba-install || { echo "error installing gba libfat"; exit 1; }
|
$MAKE gba-install || { echo "error installing gba libfat"; exit 1; }
|
||||||
|
|
||||||
cd $BUILDDIR/maxmod-$MAXMOD_VER
|
|
||||||
$MAKE || { echo "error building maxmod"; exit 1; }
|
|
||||||
$MAKE install || { echo "error installing maxmod"; exit 1; }
|
|
||||||
|
|
||||||
cd $BUILDDIR/libmirko-$LIBMIRKO_VER
|
cd $BUILDDIR/libmirko-$LIBMIRKO_VER
|
||||||
$MAKE || { echo "error building libmirko"; exit 1; }
|
$MAKE || { echo "error building libmirko"; exit 1; }
|
||||||
$MAKE install || { echo "error installing libmirko"; exit 1; }
|
$MAKE install || { echo "error installing libmirko"; exit 1; }
|
||||||
@@ -45,3 +54,8 @@ $MAKE install || { echo "error installing libmirko"; exit 1; }
|
|||||||
cd $BUILDDIR/libfilesystem-$FILESYSTEM_VER
|
cd $BUILDDIR/libfilesystem-$FILESYSTEM_VER
|
||||||
$MAKE || { echo "error building libfilesystem"; exit 1; }
|
$MAKE || { echo "error building libfilesystem"; exit 1; }
|
||||||
$MAKE install || { echo "error installing libfilesystem"; exit 1; }
|
$MAKE install || { echo "error installing libfilesystem"; exit 1; }
|
||||||
|
|
||||||
|
cd $BUILDDIR/libctru-$LIBCTRU_VER
|
||||||
|
$MAKE || { echo "error building libctru"; exit 1; }
|
||||||
|
$MAKE install || { echo "error installing libctru"; exit 1; }
|
||||||
|
|
||||||
|
|||||||
16
dkarm-eabi/scripts/build-gcc.sh
Normal file → Executable file
16
dkarm-eabi/scripts/build-gcc.sh
Normal file → Executable file
@@ -34,18 +34,21 @@ cd $BUILDDIR
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# build and install just the c compiler
|
# build and install just the c compiler
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
mkdir -p $target/gcc-stage1
|
mkdir -p $target/gcc
|
||||||
cd $target/gcc-stage1
|
cd $target/gcc
|
||||||
|
|
||||||
if [ ! -f configured-gcc ]
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
CFLAGS="$cflags" CXXFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" CXXFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
||||||
--enable-languages=c,c++,objc,obj-c++ \
|
--enable-languages=c,c++,objc,obj-c++ \
|
||||||
|
--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 \
|
||||||
@@ -53,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 39" \
|
--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
|
||||||
@@ -83,10 +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 \
|
|
||||||
--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
4
dkarm-eabi/scripts/build-tools.sh
Normal file → Executable 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
|
||||||
|
|||||||
257
dkppc/crtls/wup.ld
Normal file
257
dkppc/crtls/wup.ld
Normal file
@@ -0,0 +1,257 @@
|
|||||||
|
/*
|
||||||
|
* Linkscript for Wii U
|
||||||
|
*/
|
||||||
|
|
||||||
|
OUTPUT_FORMAT("elf32-powerpc", "elf32-powerpc", "elf32-powerpc");
|
||||||
|
OUTPUT_ARCH(powerpc:common);
|
||||||
|
EXTERN(_start);
|
||||||
|
ENTRY(_start);
|
||||||
|
|
||||||
|
PHDRS
|
||||||
|
{
|
||||||
|
stub PT_LOAD FLAGS(5);
|
||||||
|
text PT_LOAD FLAGS(5);
|
||||||
|
data PT_LOAD FLAGS(6);
|
||||||
|
bss1 PT_LOAD;
|
||||||
|
bss2 PT_LOAD;
|
||||||
|
}
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
/* default base address */
|
||||||
|
/* use -Wl,--section-start,.init=0xADDRESS to change */
|
||||||
|
. = 0x00802000;
|
||||||
|
|
||||||
|
/* Program */
|
||||||
|
.init :
|
||||||
|
{
|
||||||
|
KEEP (*crt0.o(*.init))
|
||||||
|
KEEP (*(.init))
|
||||||
|
} :text = 0
|
||||||
|
.plt : { *(.plt) }
|
||||||
|
.interp : { *(.interp) }
|
||||||
|
.hash : { *(.hash) }
|
||||||
|
.dynsym : { *(.dynsym) }
|
||||||
|
.dynstr : { *(.dynstr) }
|
||||||
|
.gnu.version : { *(.gnu.version) }
|
||||||
|
.gnu.version_d : { *(.gnu.version_d) }
|
||||||
|
.gnu.version_r : { *(.gnu.version_r) }
|
||||||
|
.rel.init : { *(.rel.init) }
|
||||||
|
.rela.init : { *(.rela.init) }
|
||||||
|
.rel.text : { *(.rel.text .rel.text.* .rel.gnu.linkonce.t.*) }
|
||||||
|
.rela.text : { *(.rela.text .rela.text.* .rela.gnu.linkonce.t.*) }
|
||||||
|
.rel.fini : { *(.rel.fini) }
|
||||||
|
.rela.fini : { *(.rela.fini) }
|
||||||
|
.rel.rodata : { *(.rel.rodata .rel.rodata.* .rel.gnu.linkonce.r.*) }
|
||||||
|
.rela.rodata : { *(.rela.rodata .rela.rodata.* .rela.gnu.linkonce.r.*) }
|
||||||
|
.rel.data : { *(.rel.data .rel.data.* .rel.gnu.linkonce.d.*) }
|
||||||
|
.rela.data : { *(.rela.data .rela.data.* .rela.gnu.linkonce.d.*) }
|
||||||
|
.rel.tdata : { *(.rel.tdata .rel.tdata.* .rel.gnu.linkonce.td.*) }
|
||||||
|
.rela.tdata : { *(.rela.tdata .rela.tdata.* .rela.gnu.linkonce.td.*) }
|
||||||
|
.rel.tbss : { *(.rel.tbss .rel.tbss.* .rel.gnu.linkonce.tb.*) }
|
||||||
|
.rela.tbss : { *(.rela.tbss .rela.tbss.* .rela.gnu.linkonce.tb.*) }
|
||||||
|
.rel.ctors : { *(.rel.ctors) }
|
||||||
|
.rela.ctors : { *(.rela.ctors) }
|
||||||
|
.rel.dtors : { *(.rel.dtors) }
|
||||||
|
.rela.dtors : { *(.rela.dtors) }
|
||||||
|
.rel.got : { *(.rel.got) }
|
||||||
|
.rela.got : { *(.rela.got) }
|
||||||
|
.rela.got1 : { *(.rela.got1) }
|
||||||
|
.rela.got2 : { *(.rela.got2) }
|
||||||
|
.rel.sdata : { *(.rel.sdata .rel.sdata.* .rel.gnu.linkonce.s.*) }
|
||||||
|
.rela.sdata : { *(.rela.sdata .rela.sdata.* .rela.gnu.linkonce.s.*) }
|
||||||
|
.rel.sbss : { *(.rel.sbss .rel.sbss.* .rel.gnu.linkonce.sb.*) }
|
||||||
|
.rela.sbss : { *(.rela.sbss .rela.sbss.* .rel.gnu.linkonce.sb.*) }
|
||||||
|
.rel.sdata2 : { *(.rel.sdata2 .rel.sdata2.* .rel.gnu.linkonce.s2.*) }
|
||||||
|
.rela.sdata2 : { *(.rela.sdata2 .rela.sdata2.* .rela.gnu.linkonce.s2.*) }
|
||||||
|
.rel.sbss2 : { *(.rel.sbss2 .rel.sbss2.* .rel.gnu.linkonce.sb2.*) }
|
||||||
|
.rela.sbss2 : { *(.rela.sbss2 .rela.sbss2.* .rela.gnu.linkonce.sb2.*) }
|
||||||
|
.rel.bss : { *(.rel.bss .rel.bss.* .rel.gnu.linkonce.b.*) }
|
||||||
|
.rela.bss : { *(.rela.bss .rela.bss.* .rela.gnu.linkonce.b.*) }
|
||||||
|
.rel.plt : { *(.rel.plt) }
|
||||||
|
.rela.plt : { *(.rela.plt) }
|
||||||
|
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
*(.text)
|
||||||
|
*(.text.*)
|
||||||
|
/* .gnu.warning sections are handled specially by elf32.em. */
|
||||||
|
*(.gnu.warning)
|
||||||
|
*(.gnu.linkonce.t.*)
|
||||||
|
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||||
|
} = 0
|
||||||
|
|
||||||
|
.fini :
|
||||||
|
{
|
||||||
|
KEEP (*(.fini))
|
||||||
|
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||||
|
} = 0
|
||||||
|
|
||||||
|
PROVIDE (__etext = .);
|
||||||
|
PROVIDE (_etext = .);
|
||||||
|
PROVIDE (etext = .);
|
||||||
|
|
||||||
|
.rodata : { *(.rodata) *(.rodata.*) *(.gnu.linkonce.r.*) } :data
|
||||||
|
.rodata1 : { *(.rodata1) }
|
||||||
|
.sdata2 : { *(.sdata2) *(.sdata2.*) *(.gnu.linkonce.s2.*) }
|
||||||
|
.sbss2 : { *(.sbss2) *(.sbss2.*) *(.gnu.linkonce.sb2.*) }
|
||||||
|
/* Adjust the address for the data segment. We want to adjust up to
|
||||||
|
the same address within the page on the next page up. */
|
||||||
|
/* Ensure the __preinit_array_start label is properly aligned. We
|
||||||
|
could instead move the label definition inside the section, but
|
||||||
|
the linker would then create the section even if it turns out to
|
||||||
|
be empty, which isn't pretty. */
|
||||||
|
. = ALIGN(32 / 8);
|
||||||
|
PROVIDE (__preinit_array_start = .);
|
||||||
|
.preinit_array : { *(.preinit_array) }
|
||||||
|
PROVIDE (__preinit_array_end = .);
|
||||||
|
PROVIDE (__init_array_start = .);
|
||||||
|
.init_array : { *(.init_array) }
|
||||||
|
PROVIDE (__init_array_end = .);
|
||||||
|
PROVIDE (__fini_array_start = .);
|
||||||
|
.fini_array : { *(.fini_array) }
|
||||||
|
PROVIDE (__fini_array_end = .);
|
||||||
|
.data :
|
||||||
|
{
|
||||||
|
*(.data)
|
||||||
|
*(.data.*)
|
||||||
|
*(.gnu.linkonce.d.*)
|
||||||
|
SORT(CONSTRUCTORS)
|
||||||
|
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||||
|
}
|
||||||
|
|
||||||
|
.data1 : { *(.data1) }
|
||||||
|
.tdata : { *(.tdata .tdata.* .gnu.linkonce.td.*) }
|
||||||
|
.tbss : { *(.tbss .tbss.* .gnu.linkonce.tb.*) *(.tcommon) }
|
||||||
|
.eh_frame : { KEEP (*(.eh_frame)) }
|
||||||
|
.gcc_except_table : { *(.gcc_except_table) }
|
||||||
|
.fixup : { *(.fixup) }
|
||||||
|
.got1 : { *(.got1) }
|
||||||
|
.got2 : { *(.got2) }
|
||||||
|
.dynamic : { *(.dynamic) }
|
||||||
|
|
||||||
|
.ctors :
|
||||||
|
{
|
||||||
|
/* gcc uses crtbegin.o to find the start of
|
||||||
|
the constructors, so we make sure it is
|
||||||
|
first. Because this is a wildcard, it
|
||||||
|
doesn't matter if the user does not
|
||||||
|
actually link against crtbegin.o; the
|
||||||
|
linker won't look for a file to match a
|
||||||
|
wildcard. The wildcard also means that it
|
||||||
|
doesn't matter which directory crtbegin.o
|
||||||
|
is in. */
|
||||||
|
|
||||||
|
KEEP (*crtbegin.o(.ctors))
|
||||||
|
|
||||||
|
/* We don't want to include the .ctor section from
|
||||||
|
from the crtend.o file until after the sorted ctors.
|
||||||
|
The .ctor section from the crtend file contains the
|
||||||
|
end of ctors marker and it must be last */
|
||||||
|
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend.o ) .ctors))
|
||||||
|
KEEP (*(SORT(.ctors.*)))
|
||||||
|
KEEP (*(.ctors))
|
||||||
|
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||||
|
}
|
||||||
|
|
||||||
|
.dtors :
|
||||||
|
{
|
||||||
|
KEEP (*crtbegin.o(.dtors))
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend.o ) .dtors))
|
||||||
|
KEEP (*(SORT(.dtors.*)))
|
||||||
|
KEEP (*(.dtors))
|
||||||
|
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||||
|
}
|
||||||
|
|
||||||
|
.jcr : { KEEP (*(.jcr)) }
|
||||||
|
.got : { *(.got.plt) *(.got) }
|
||||||
|
|
||||||
|
|
||||||
|
/* We want the small data sections together, so single-instruction offsets
|
||||||
|
can access them all, and initialized data all before uninitialized, so
|
||||||
|
we can shorten the on-disk segment size. */
|
||||||
|
|
||||||
|
.sdata :
|
||||||
|
{
|
||||||
|
*(.sdata)
|
||||||
|
*(.sdata.*)
|
||||||
|
*(.gnu.linkonce.s.*)
|
||||||
|
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||||
|
}
|
||||||
|
|
||||||
|
_edata = .;
|
||||||
|
PROVIDE (edata = .);
|
||||||
|
|
||||||
|
.sbss :
|
||||||
|
{
|
||||||
|
__sbss_start = .;
|
||||||
|
PROVIDE (__sbss_start = .);
|
||||||
|
PROVIDE (___sbss_start = .);
|
||||||
|
*(.dynsbss)
|
||||||
|
*(.sbss)
|
||||||
|
*(.sbss.*)
|
||||||
|
*(.gnu.linkonce.sb.*)
|
||||||
|
*(.scommon)
|
||||||
|
PROVIDE (__sbss_end = .);
|
||||||
|
PROVIDE (___sbss_end = .);
|
||||||
|
. = ALIGN(32); /* REQUIRED. LD is flaky without it. */
|
||||||
|
__sbss_end = .;
|
||||||
|
} :bss1
|
||||||
|
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
__bss_start = .;
|
||||||
|
PROVIDE (__bss_start = .);
|
||||||
|
*(.dynbss)
|
||||||
|
*(.bss)
|
||||||
|
*(.bss.*)
|
||||||
|
*(.gnu.linkonce.b.*)
|
||||||
|
*(COMMON)
|
||||||
|
/* Align here to ensure that the .bss section occupies space up to
|
||||||
|
_end. Align after .bss to ensure correct alignment even if the
|
||||||
|
.bss section disappears because there are no input sections. */
|
||||||
|
|
||||||
|
. = ALIGN(32);
|
||||||
|
|
||||||
|
PROVIDE (__bss_end = .);
|
||||||
|
__bss_end = .;
|
||||||
|
} :bss2
|
||||||
|
|
||||||
|
_end = .;
|
||||||
|
PROVIDE(end = .);
|
||||||
|
/* Stabs debugging sections. */
|
||||||
|
.stab 0 : { *(.stab) }
|
||||||
|
.stabstr 0 : { *(.stabstr) }
|
||||||
|
.stab.excl 0 : { *(.stab.excl) }
|
||||||
|
.stab.exclstr 0 : { *(.stab.exclstr) }
|
||||||
|
.stab.index 0 : { *(.stab.index) }
|
||||||
|
.stab.indexstr 0 : { *(.stab.indexstr) }
|
||||||
|
.comment 0 : { *(.comment) }
|
||||||
|
/* DWARF debug sections.
|
||||||
|
Symbols in the DWARF debugging sections are relative to the beginning
|
||||||
|
of the section so we begin them at 0. */
|
||||||
|
/* DWARF 1 */
|
||||||
|
.debug 0 : { *(.debug) }
|
||||||
|
.line 0 : { *(.line) }
|
||||||
|
/* GNU DWARF 1 extensions */
|
||||||
|
.debug_srcinfo 0 : { *(.debug_srcinfo) }
|
||||||
|
.debug_sfnames 0 : { *(.debug_sfnames) }
|
||||||
|
/* DWARF 1.1 and DWARF 2 */
|
||||||
|
.debug_aranges 0 : { *(.debug_aranges) }
|
||||||
|
.debug_pubnames 0 : { *(.debug_pubnames) }
|
||||||
|
/* DWARF 2 */
|
||||||
|
.debug_info 0 : { *(.debug_info) }
|
||||||
|
.debug_abbrev 0 : { *(.debug_abbrev) }
|
||||||
|
.debug_line 0 : { *(.debug_line) }
|
||||||
|
.debug_frame 0 : { *(.debug_frame) }
|
||||||
|
.debug_str 0 : { *(.debug_str) }
|
||||||
|
.debug_loc 0 : { *(.debug_loc) }
|
||||||
|
.debug_macinfo 0 : { *(.debug_macinfo) }
|
||||||
|
/* SGI/MIPS DWARF 2 extensions */
|
||||||
|
.debug_weaknames 0 : { *(.debug_weaknames) }
|
||||||
|
.debug_funcnames 0 : { *(.debug_funcnames) }
|
||||||
|
.debug_typenames 0 : { *(.debug_typenames) }
|
||||||
|
.debug_varnames 0 : { *(.debug_varnames) }
|
||||||
|
/* These must appear regardless of . */
|
||||||
|
}
|
||||||
@@ -1,149 +0,0 @@
|
|||||||
diff -Nbaur binutils-2.22/bfd/bfd-in2.h binutils-2.22-ppc/bfd/bfd-in2.h
|
|
||||||
--- binutils-2.22/bfd/bfd-in2.h 2011-09-16 02:15:18.000000000 +0100
|
|
||||||
+++ binutils-2.22-ppc/bfd/bfd-in2.h 2012-04-03 15:06:10.000000000 +0100
|
|
||||||
@@ -38,6 +38,8 @@
|
|
||||||
|
|
||||||
#include "ansidecl.h"
|
|
||||||
#include "symcat.h"
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+
|
|
||||||
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
|
|
||||||
#ifndef SABER
|
|
||||||
/* This hack is to avoid a problem with some strict ANSI C preprocessors.
|
|
||||||
@@ -308,8 +310,6 @@
|
|
||||||
&& (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
|
|
||||||
&& (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
|
|
||||||
|
|
||||||
-/* Forward define. */
|
|
||||||
-struct stat;
|
|
||||||
|
|
||||||
typedef enum bfd_print_symbol
|
|
||||||
{
|
|
||||||
diff -Nbaur binutils-2.22/bfd/bfd-in.h binutils-2.22-ppc/bfd/bfd-in.h
|
|
||||||
--- binutils-2.22/bfd/bfd-in.h 2011-09-16 02:15:18.000000000 +0100
|
|
||||||
+++ binutils-2.22-ppc/bfd/bfd-in.h 2012-04-03 15:06:10.000000000 +0100
|
|
||||||
@@ -31,6 +31,8 @@
|
|
||||||
|
|
||||||
#include "ansidecl.h"
|
|
||||||
#include "symcat.h"
|
|
||||||
+#include <sys/stat.h>
|
|
||||||
+
|
|
||||||
#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
|
|
||||||
#ifndef SABER
|
|
||||||
/* This hack is to avoid a problem with some strict ANSI C preprocessors.
|
|
||||||
@@ -301,8 +303,6 @@
|
|
||||||
&& (sec)->sec_info_type != ELF_INFO_TYPE_MERGE \
|
|
||||||
&& (sec)->sec_info_type != ELF_INFO_TYPE_JUST_SYMS)
|
|
||||||
|
|
||||||
-/* Forward define. */
|
|
||||||
-struct stat;
|
|
||||||
|
|
||||||
typedef enum bfd_print_symbol
|
|
||||||
{
|
|
||||||
diff -Nbaur binutils-2.22/bfd/config.in binutils-2.22-ppc/bfd/config.in
|
|
||||||
--- binutils-2.22/bfd/config.in 2011-05-12 08:41:40.000000000 +0100
|
|
||||||
+++ binutils-2.22-ppc/bfd/config.in 2012-04-03 14:50:51.000000000 +0100
|
|
||||||
@@ -245,6 +245,9 @@
|
|
||||||
/* Define if <sys/procfs.h> has win32_pstatus_t. */
|
|
||||||
#undef HAVE_WIN32_PSTATUS_T
|
|
||||||
|
|
||||||
+/* Define to 1 if you have the <windows.h> header file. */
|
|
||||||
+#undef HAVE_WINDOWS_H
|
|
||||||
+
|
|
||||||
/* Define to 1 if you have the <zlib.h> header file. */
|
|
||||||
#undef HAVE_ZLIB_H
|
|
||||||
|
|
||||||
diff -Nbaur binutils-2.22/bfd/configure binutils-2.22-ppc/bfd/configure
|
|
||||||
--- binutils-2.22/bfd/configure 2011-11-21 11:55:48.000000000 +0000
|
|
||||||
+++ binutils-2.22-ppc/bfd/configure 2012-04-03 14:50:59.000000000 +0100
|
|
||||||
@@ -13508,6 +13508,22 @@
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
+
|
|
||||||
+for ac_header in windows.h dlfcn.h
|
|
||||||
+do :
|
|
||||||
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
|
||||||
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
|
||||||
+eval as_val=\$$as_ac_Header
|
|
||||||
+ if test "x$as_val" = x""yes; then :
|
|
||||||
+ cat >>confdefs.h <<_ACEOF
|
|
||||||
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
|
|
||||||
+_ACEOF
|
|
||||||
+
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+done
|
|
||||||
+
|
|
||||||
+
|
|
||||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether string.h and strings.h may both be included" >&5
|
|
||||||
$as_echo_n "checking whether string.h and strings.h may both be included... " >&6; }
|
|
||||||
if test "${gcc_cv_header_string+set}" = set; then :
|
|
||||||
diff -Nbaur binutils-2.22/bfd/configure.in binutils-2.22-ppc/bfd/configure.in
|
|
||||||
--- binutils-2.22/bfd/configure.in 2011-11-21 11:55:46.000000000 +0000
|
|
||||||
+++ binutils-2.22-ppc/bfd/configure.in 2012-04-03 14:51:23.000000000 +0100
|
|
||||||
@@ -190,6 +190,9 @@
|
|
||||||
GCC_HEADER_STDINT(bfd_stdint.h)
|
|
||||||
AC_HEADER_TIME
|
|
||||||
AC_HEADER_DIRENT
|
|
||||||
+
|
|
||||||
+AC_CHECK_HEADERS(windows.h dlfcn.h)
|
|
||||||
+
|
|
||||||
ACX_HEADER_STRING
|
|
||||||
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid fileno)
|
|
||||||
AC_CHECK_FUNCS(strtoull)
|
|
||||||
diff -Nbaur binutils-2.22/bfd/plugin.c binutils-2.22-ppc/bfd/plugin.c
|
|
||||||
--- binutils-2.22/bfd/plugin.c 2011-07-11 16:03:07.000000000 +0100
|
|
||||||
+++ binutils-2.22-ppc/bfd/plugin.c 2012-04-03 14:51:32.000000000 +0100
|
|
||||||
@@ -25,7 +25,13 @@
|
|
||||||
#if BFD_SUPPORTS_PLUGINS
|
|
||||||
|
|
||||||
#include <assert.h>
|
|
||||||
+#ifdef HAVE_DLFCN_H
|
|
||||||
#include <dlfcn.h>
|
|
||||||
+#elif defined (HAVE_WINDOWS_H)
|
|
||||||
+#include <windows.h>
|
|
||||||
+#else
|
|
||||||
+#error Unknown how to handle dynamic-load-libraries.
|
|
||||||
+#endif
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include "plugin-api.h"
|
|
||||||
#include "sysdep.h"
|
|
||||||
@@ -34,6 +40,37 @@
|
|
||||||
#include "libiberty.h"
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
+#if !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H)
|
|
||||||
+
|
|
||||||
+#define RTLD_NOW 0 /* Dummy value. */
|
|
||||||
+
|
|
||||||
+static void *
|
|
||||||
+dlopen (const char *file, int mode ATTRIBUTE_UNUSED)
|
|
||||||
+{
|
|
||||||
+ return LoadLibrary (file);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static void *
|
|
||||||
+dlsym (void *handle, const char *name)
|
|
||||||
+{
|
|
||||||
+ return GetProcAddress (handle, name);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int ATTRIBUTE_UNUSED
|
|
||||||
+dlclose (void *handle)
|
|
||||||
+{
|
|
||||||
+ FreeLibrary (handle);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const char *
|
|
||||||
+dlerror (void)
|
|
||||||
+{
|
|
||||||
+ return "Unable to load DLL.";
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#endif /* !defined (HAVE_DLFCN_H) && defined (HAVE_WINDOWS_H) */
|
|
||||||
+
|
|
||||||
#define bfd_plugin_close_and_cleanup _bfd_generic_close_and_cleanup
|
|
||||||
#define bfd_plugin_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
|
|
||||||
#define bfd_plugin_new_section_hook _bfd_generic_new_section_hook
|
|
||||||
12
dkppc/patches/binutils-2.27.patch
Normal file
12
dkppc/patches/binutils-2.27.patch
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
diff -Nbaur binutils-2.27/opcodes/ppc-opc.c binutils-2.27-ppc/opcodes/ppc-opc.c
|
||||||
|
--- binutils-2.27/opcodes/ppc-opc.c 2016-08-03 08:36:54.000000000 +0100
|
||||||
|
+++ binutils-2.27-ppc/opcodes/ppc-opc.c 2016-11-08 21:37:45.360000000 +0000
|
||||||
|
@@ -3037,7 +3037,7 @@
|
||||||
|
#define MFDEC1 PPC_OPCODE_POWER
|
||||||
|
#define MFDEC2 PPC_OPCODE_PPC | PPC_OPCODE_601 | PPC_OPCODE_BOOKE | PPC_OPCODE_TITAN
|
||||||
|
#define BOOKE PPC_OPCODE_BOOKE
|
||||||
|
-#define NO371 PPC_OPCODE_BOOKE | PPC_OPCODE_PPCPS | PPC_OPCODE_EFS
|
||||||
|
+#define NO371 PPC_OPCODE_BOOKE | PPC_OPCODE_EFS
|
||||||
|
#define PPCE300 PPC_OPCODE_E300
|
||||||
|
#define PPCSPE PPC_OPCODE_SPE
|
||||||
|
#define PPCISEL PPC_OPCODE_ISEL
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
diff -Nbaur gcc-4.6.3/gcc/config/rs6000/rs6000.h gcc-4.6.3-ppc/gcc/config/rs6000/rs6000.h
|
diff -NBaur gcc-6.1.0/gcc/config/rs6000/rs6000.h gcc-6.1.0-ppc/gcc/config/rs6000/rs6000.h
|
||||||
--- gcc-4.6.3/gcc/config/rs6000/rs6000.h 2011-07-27 19:17:15.000000000 +0100
|
--- gcc-6.1.0/gcc/config/rs6000/rs6000.h 2016-01-20 20:30:24.000000000 +0000
|
||||||
+++ gcc-4.6.3-ppc/gcc/config/rs6000/rs6000.h 2012-04-21 22:54:04.000000000 +0100
|
+++ gcc-6.1.0-ppc/gcc/config/rs6000/rs6000.h 2016-05-20 12:10:24.645019640 +0100
|
||||||
@@ -200,6 +200,7 @@
|
@@ -205,6 +205,7 @@
|
||||||
{ "asm_cpu_476", ASM_CPU_476_SPEC }, \
|
{ "asm_cpu_476", ASM_CPU_476_SPEC }, \
|
||||||
SUBTARGET_EXTRA_SPECS
|
SUBTARGET_EXTRA_SPECS
|
||||||
|
|
||||||
@@ -9,42 +9,44 @@ diff -Nbaur gcc-4.6.3/gcc/config/rs6000/rs6000.h gcc-4.6.3-ppc/gcc/config/rs6000
|
|||||||
/* -mcpu=native handling only makes sense with compiler running on
|
/* -mcpu=native handling only makes sense with compiler running on
|
||||||
an PowerPC chip. If changing this condition, also change
|
an PowerPC chip. If changing this condition, also change
|
||||||
the condition in driver-rs6000.c. */
|
the condition in driver-rs6000.c. */
|
||||||
@@ -214,6 +215,8 @@
|
@@ -219,6 +220,8 @@
|
||||||
#else
|
#else
|
||||||
#define ASM_CPU_NATIVE_SPEC "%(asm_default)"
|
#define ASM_CPU_NATIVE_SPEC "%(asm_default)"
|
||||||
#endif
|
#endif
|
||||||
+#endif
|
+#endif
|
||||||
+#define ASM_CPU_NATIVE_SPEC "%(asm_default)"
|
+#define ASM_CPU_NATIVE_SPEC "%(asm_default)"
|
||||||
|
|
||||||
#ifndef CC1_CPU_SPEC
|
#ifndef CC1_CPU_SPEC
|
||||||
#ifdef HAVE_LOCAL_CPU_DETECT
|
#ifdef HAVE_LOCAL_CPU_DETECT
|
||||||
diff -Nbaur gcc-4.6.3/gcc/config/rs6000/sysv4.h gcc-4.6.3-ppc/gcc/config/rs6000/sysv4.h
|
diff -NBaur gcc-6.1.0/gcc/config/rs6000/sysv4.h gcc-6.1.0-ppc/gcc/config/rs6000/sysv4.h
|
||||||
--- gcc-4.6.3/gcc/config/rs6000/sysv4.h 2011-03-07 07:50:23.000000000 +0000
|
--- gcc-6.1.0/gcc/config/rs6000/sysv4.h 2016-01-04 14:30:50.000000000 +0000
|
||||||
+++ gcc-4.6.3-ppc/gcc/config/rs6000/sysv4.h 2012-04-21 22:54:04.000000000 +0100
|
+++ gcc-6.1.0-ppc/gcc/config/rs6000/sysv4.h 2016-05-20 12:12:27.073019640 +0100
|
||||||
@@ -603,7 +603,11 @@
|
@@ -559,7 +559,12 @@
|
||||||
|
|
||||||
/* Default starting address if specified. */
|
/* Default starting address if specified. */
|
||||||
#define LINK_START_SPEC "\
|
#define LINK_START_SPEC "\
|
||||||
-%{mads : %(link_start_ads) ; \
|
-%{mads : %(link_start_ads) ; \
|
||||||
+%{mgcn|mogc : %(link_start_ogc) ; \
|
+%{mgcn|mogc : %(link_start_ogc) ; \
|
||||||
+ mvgc : %(link_start_vgc) ; \
|
+ mvgc : %(link_start_vgc) ; \
|
||||||
+ mgcbios : %(link_start_gcb) ; \
|
+ mgcbios : %(link_start_gcb) ; \
|
||||||
+ mrvl : %(link_start_rvl) ; \
|
+ mrvl : %(link_start_rvl) ; \
|
||||||
|
+ mwup : %(link_start_wup) ; \
|
||||||
+ mads : %(link_start_ads) ; \
|
+ mads : %(link_start_ads) ; \
|
||||||
myellowknife : %(link_start_yellowknife) ; \
|
myellowknife : %(link_start_yellowknife) ; \
|
||||||
mmvme : %(link_start_mvme) ; \
|
mmvme : %(link_start_mvme) ; \
|
||||||
msim : %(link_start_sim) ; \
|
msim : %(link_start_sim) ; \
|
||||||
@@ -641,7 +645,8 @@
|
@@ -590,7 +594,9 @@
|
||||||
|
|
||||||
/* Any specific OS flags. */
|
/* Any specific OS flags. */
|
||||||
#define LINK_OS_SPEC "\
|
#define LINK_OS_SPEC "\
|
||||||
-%{mads : %(link_os_ads) ; \
|
-%{mads : %(link_os_ads) ; \
|
||||||
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(link_os_ogc) ; \
|
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(link_os_ogc) ; \
|
||||||
|
+ mwup : %(link_os_wup) ; \
|
||||||
+ mads : %(link_os_ads) ; \
|
+ mads : %(link_os_ads) ; \
|
||||||
myellowknife : %(link_os_yellowknife) ; \
|
myellowknife : %(link_os_yellowknife) ; \
|
||||||
mmvme : %(link_os_mvme) ; \
|
mmvme : %(link_os_mvme) ; \
|
||||||
msim : %(link_os_sim) ; \
|
msim : %(link_os_sim) ; \
|
||||||
@@ -660,7 +665,10 @@
|
@@ -608,7 +613,11 @@
|
||||||
/* Override rs6000.h definition. */
|
/* Override rs6000.h definition. */
|
||||||
#undef CPP_SPEC
|
#undef CPP_SPEC
|
||||||
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
|
#define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \
|
||||||
@@ -52,11 +54,12 @@ diff -Nbaur gcc-4.6.3/gcc/config/rs6000/sysv4.h gcc-4.6.3-ppc/gcc/config/rs6000/
|
|||||||
+%{mgcn : %(cpp_os_gcn) ; \
|
+%{mgcn : %(cpp_os_gcn) ; \
|
||||||
+ mogc|mvgc|mgcbios : %(cpp_os_ogc) ; \
|
+ mogc|mvgc|mgcbios : %(cpp_os_ogc) ; \
|
||||||
+ mrvl : %(cpp_os_rvl) ; \
|
+ mrvl : %(cpp_os_rvl) ; \
|
||||||
|
+ mwup : %(cpp_os_wup) ; \
|
||||||
+ mads : %(cpp_os_ads) ; \
|
+ mads : %(cpp_os_ads) ; \
|
||||||
myellowknife : %(cpp_os_yellowknife) ; \
|
myellowknife : %(cpp_os_yellowknife) ; \
|
||||||
mmvme : %(cpp_os_mvme) ; \
|
mmvme : %(cpp_os_mvme) ; \
|
||||||
msim : %(cpp_os_sim) ; \
|
msim : %(cpp_os_sim) ; \
|
||||||
@@ -675,7 +683,10 @@
|
@@ -622,7 +630,11 @@
|
||||||
|
|
||||||
#undef STARTFILE_SPEC
|
#undef STARTFILE_SPEC
|
||||||
#define STARTFILE_SPEC "\
|
#define STARTFILE_SPEC "\
|
||||||
@@ -64,11 +67,12 @@ diff -Nbaur gcc-4.6.3/gcc/config/rs6000/sysv4.h gcc-4.6.3-ppc/gcc/config/rs6000/
|
|||||||
+%{mgcn : %(startfile_gcn) ; \
|
+%{mgcn : %(startfile_gcn) ; \
|
||||||
+ mogc|mvgc|mgcbios : %(startfile_ogc) ; \
|
+ mogc|mvgc|mgcbios : %(startfile_ogc) ; \
|
||||||
+ mrvl : %(startfile_ogc) ; \
|
+ mrvl : %(startfile_ogc) ; \
|
||||||
|
+ mwup : %(startfile_wup) ; \
|
||||||
+ mads : %(startfile_ads) ; \
|
+ mads : %(startfile_ads) ; \
|
||||||
myellowknife : %(startfile_yellowknife) ; \
|
myellowknife : %(startfile_yellowknife) ; \
|
||||||
mmvme : %(startfile_mvme) ; \
|
mmvme : %(startfile_mvme) ; \
|
||||||
msim : %(startfile_sim) ; \
|
msim : %(startfile_sim) ; \
|
||||||
@@ -686,11 +697,12 @@
|
@@ -632,11 +643,13 @@
|
||||||
mcall-openbsd: %(startfile_openbsd) ; \
|
mcall-openbsd: %(startfile_openbsd) ; \
|
||||||
: %(startfile_default) }"
|
: %(startfile_default) }"
|
||||||
|
|
||||||
@@ -79,11 +83,12 @@ diff -Nbaur gcc-4.6.3/gcc/config/rs6000/sysv4.h gcc-4.6.3-ppc/gcc/config/rs6000/
|
|||||||
#define LIB_SPEC "\
|
#define LIB_SPEC "\
|
||||||
-%{mads : %(lib_ads) ; \
|
-%{mads : %(lib_ads) ; \
|
||||||
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(lib_ogc) ; \
|
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(lib_ogc) ; \
|
||||||
|
+ mwup : %(lib_wup) ; \
|
||||||
+ mads : %(lib_ads) ; \
|
+ mads : %(lib_ads) ; \
|
||||||
myellowknife : %(lib_yellowknife) ; \
|
myellowknife : %(lib_yellowknife) ; \
|
||||||
mmvme : %(lib_mvme) ; \
|
mmvme : %(lib_mvme) ; \
|
||||||
msim : %(lib_sim) ; \
|
msim : %(lib_sim) ; \
|
||||||
@@ -701,11 +713,12 @@
|
@@ -646,11 +658,13 @@
|
||||||
mcall-openbsd: %(lib_openbsd) ; \
|
mcall-openbsd: %(lib_openbsd) ; \
|
||||||
: %(lib_default) }"
|
: %(lib_default) }"
|
||||||
|
|
||||||
@@ -94,98 +99,111 @@ diff -Nbaur gcc-4.6.3/gcc/config/rs6000/sysv4.h gcc-4.6.3-ppc/gcc/config/rs6000/
|
|||||||
#define ENDFILE_SPEC "\
|
#define ENDFILE_SPEC "\
|
||||||
-%{mads : %(endfile_ads) ; \
|
-%{mads : %(endfile_ads) ; \
|
||||||
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(endfile_ogc) ; \
|
+%{mgcn|mogc|mvgc|mgcbios|mrvl : %(endfile_ogc) ; \
|
||||||
|
+ mwup : %(endfile_wup) ; \
|
||||||
+ mads : %(endfile_ads) ; \
|
+ mads : %(endfile_ads) ; \
|
||||||
myellowknife : %(endfile_yellowknife) ; \
|
myellowknife : %(endfile_yellowknife) ; \
|
||||||
mmvme : %(endfile_mvme) ; \
|
mmvme : %(endfile_mvme) ; \
|
||||||
msim : %(endfile_sim) ; \
|
msim : %(endfile_sim) ; \
|
||||||
@@ -722,16 +735,27 @@
|
@@ -666,16 +679,33 @@
|
||||||
|
|
||||||
/* Motorola ADS support. */
|
/* Motorola ADS support. */
|
||||||
#define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
|
#define LIB_ADS_SPEC "--start-group -lads -lc --end-group"
|
||||||
+#define LIB_OGC_SPEC "--start-group -lsysbase -lc --end-group"
|
+#define LIB_OGC_SPEC "--start-group -lsysbase -lc --end-group"
|
||||||
|
+#define LIB_WUP_SPEC "--start-group -lsysbase -lc --end-group"
|
||||||
|
|
||||||
#define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
|
#define STARTFILE_ADS_SPEC "ecrti.o%s crt0.o%s crtbegin.o%s"
|
||||||
+#define STARTFILE_OGC_SPEC "ecrti.o%s crtbegin.o%s crtmain.o%s"
|
+#define STARTFILE_OGC_SPEC "ecrti.o%s crtbegin.o%s crtmain.o%s"
|
||||||
|
+#define STARTFILE_WUP_SPEC "ecrti.o%s crtbegin.o%s crtmain.o%s"
|
||||||
|
|
||||||
#define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
|
#define ENDFILE_ADS_SPEC "crtend.o%s ecrtn.o%s"
|
||||||
+#define ENDFILE_OGC_SPEC "crtend.o%s ecrtn.o%s"
|
+#define ENDFILE_OGC_SPEC "crtend.o%s ecrtn.o%s"
|
||||||
|
+#define ENDFILE_WUP_SPEC "crtend.o%s ecrtn.o%s"
|
||||||
|
|
||||||
#define LINK_START_ADS_SPEC "-T ads.ld%s"
|
#define LINK_START_ADS_SPEC "-T ads.ld%s"
|
||||||
+#define LINK_START_OGC_SPEC "-T ogc.ld%s"
|
+#define LINK_START_OGC_SPEC "-T ogc.ld%s"
|
||||||
+#define LINK_START_RVL_SPEC "-T rvl.ld%s"
|
+#define LINK_START_RVL_SPEC "-T rvl.ld%s"
|
||||||
|
+#define LINK_START_WUP_SPEC "-T wup.ld%s"
|
||||||
+#define LINK_START_VGC_SPEC "-T vgcogc.ld%s"
|
+#define LINK_START_VGC_SPEC "-T vgcogc.ld%s"
|
||||||
+#define LINK_START_GCB_SPEC "-T gcbogc.ld%s"
|
+#define LINK_START_GCB_SPEC "-T gcbogc.ld%s"
|
||||||
|
|
||||||
#define LINK_OS_ADS_SPEC ""
|
#define LINK_OS_ADS_SPEC ""
|
||||||
+#define LINK_OS_OGC_SPEC "--gc-sections"
|
+#define LINK_OS_OGC_SPEC "--gc-sections"
|
||||||
|
+#define LINK_OS_WUP_SPEC "--gc-sections"
|
||||||
|
|
||||||
#define CPP_OS_ADS_SPEC ""
|
#define CPP_OS_ADS_SPEC ""
|
||||||
+#define CPP_OS_GCN_SPEC "-D__gamecube__ -ffunction-sections -fdata-sections"
|
+#define CPP_OS_GCN_SPEC "-D__gamecube__ -ffunction-sections -fdata-sections"
|
||||||
+#define CPP_OS_OGC_SPEC "-D__gamecube__ -DHW_DOL -ffunction-sections -fdata-sections"
|
+#define CPP_OS_OGC_SPEC "-D__gamecube__ -DHW_DOL -ffunction-sections -fdata-sections"
|
||||||
+#define CPP_OS_RVL_SPEC "-D__wii__ -DHW_RVL -ffunction-sections -fdata-sections"
|
+#define CPP_OS_RVL_SPEC "-D__wii__ -DHW_RVL -ffunction-sections -fdata-sections"
|
||||||
|
+#define CPP_OS_WUP_SPEC "-D__wiiu__ -DHW_WUP -ffunction-sections -fdata-sections"
|
||||||
|
|
||||||
/* Motorola Yellowknife support. */
|
/* Motorola Yellowknife support. */
|
||||||
#define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
|
#define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group"
|
||||||
@@ -926,6 +950,7 @@
|
@@ -855,6 +879,8 @@
|
||||||
#undef SUBTARGET_EXTRA_SPECS
|
#undef SUBTARGET_EXTRA_SPECS
|
||||||
#define SUBTARGET_EXTRA_SPECS \
|
#define SUBTARGET_EXTRA_SPECS \
|
||||||
{ "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
|
{ "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \
|
||||||
+ { "lib_ogc", LIB_OGC_SPEC }, \
|
+ { "lib_ogc", LIB_OGC_SPEC }, \
|
||||||
|
+ { "lib_wup", LIB_WUP_SPEC }, \
|
||||||
{ "lib_ads", LIB_ADS_SPEC }, \
|
{ "lib_ads", LIB_ADS_SPEC }, \
|
||||||
{ "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
|
{ "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \
|
||||||
{ "lib_mvme", LIB_MVME_SPEC }, \
|
{ "lib_mvme", LIB_MVME_SPEC }, \
|
||||||
@@ -936,6 +961,7 @@
|
@@ -864,6 +889,8 @@
|
||||||
{ "lib_netbsd", LIB_NETBSD_SPEC }, \
|
{ "lib_netbsd", LIB_NETBSD_SPEC }, \
|
||||||
{ "lib_openbsd", LIB_OPENBSD_SPEC }, \
|
{ "lib_openbsd", LIB_OPENBSD_SPEC }, \
|
||||||
{ "lib_default", LIB_DEFAULT_SPEC }, \
|
{ "lib_default", LIB_DEFAULT_SPEC }, \
|
||||||
+ { "startfile_ogc", STARTFILE_OGC_SPEC }, \
|
+ { "startfile_ogc", STARTFILE_OGC_SPEC }, \
|
||||||
|
+ { "startfile_wup", STARTFILE_WUP_SPEC }, \
|
||||||
{ "startfile_ads", STARTFILE_ADS_SPEC }, \
|
{ "startfile_ads", STARTFILE_ADS_SPEC }, \
|
||||||
{ "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
|
{ "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \
|
||||||
{ "startfile_mvme", STARTFILE_MVME_SPEC }, \
|
{ "startfile_mvme", STARTFILE_MVME_SPEC }, \
|
||||||
@@ -946,6 +972,7 @@
|
@@ -873,6 +899,8 @@
|
||||||
{ "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
|
{ "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \
|
||||||
{ "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
|
{ "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \
|
||||||
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \
|
{ "startfile_default", STARTFILE_DEFAULT_SPEC }, \
|
||||||
+ { "endfile_ogc", ENDFILE_OGC_SPEC }, \
|
+ { "endfile_ogc", ENDFILE_OGC_SPEC }, \
|
||||||
|
+ { "endfile_wup", ENDFILE_WUP_SPEC }, \
|
||||||
{ "endfile_ads", ENDFILE_ADS_SPEC }, \
|
{ "endfile_ads", ENDFILE_ADS_SPEC }, \
|
||||||
{ "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
|
{ "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \
|
||||||
{ "endfile_mvme", ENDFILE_MVME_SPEC }, \
|
{ "endfile_mvme", ENDFILE_MVME_SPEC }, \
|
||||||
@@ -959,7 +986,11 @@
|
@@ -884,7 +911,12 @@
|
||||||
|
{ "endfile_default", ENDFILE_DEFAULT_SPEC }, \
|
||||||
{ "link_shlib", LINK_SHLIB_SPEC }, \
|
{ "link_shlib", LINK_SHLIB_SPEC }, \
|
||||||
{ "link_target", LINK_TARGET_SPEC }, \
|
|
||||||
{ "link_start", LINK_START_SPEC }, \
|
{ "link_start", LINK_START_SPEC }, \
|
||||||
+ { "link_start_vgc", LINK_START_VGC_SPEC }, \
|
+ { "link_start_vgc", LINK_START_VGC_SPEC }, \
|
||||||
+ { "link_start_gcb", LINK_START_GCB_SPEC }, \
|
+ { "link_start_gcb", LINK_START_GCB_SPEC }, \
|
||||||
+ { "link_start_rvl", LINK_START_RVL_SPEC }, \
|
+ { "link_start_rvl", LINK_START_RVL_SPEC }, \
|
||||||
|
+ { "link_start_wup", LINK_START_WUP_SPEC }, \
|
||||||
{ "link_start_ads", LINK_START_ADS_SPEC }, \
|
{ "link_start_ads", LINK_START_ADS_SPEC }, \
|
||||||
+ { "link_start_ogc", LINK_START_OGC_SPEC }, \
|
+ { "link_start_ogc", LINK_START_OGC_SPEC }, \
|
||||||
{ "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
|
{ "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \
|
||||||
{ "link_start_mvme", LINK_START_MVME_SPEC }, \
|
{ "link_start_mvme", LINK_START_MVME_SPEC }, \
|
||||||
{ "link_start_sim", LINK_START_SIM_SPEC }, \
|
{ "link_start_sim", LINK_START_SIM_SPEC }, \
|
||||||
@@ -970,6 +1001,7 @@
|
@@ -894,6 +925,8 @@
|
||||||
{ "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
|
{ "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \
|
||||||
{ "link_start_default", LINK_START_DEFAULT_SPEC }, \
|
{ "link_start_default", LINK_START_DEFAULT_SPEC }, \
|
||||||
{ "link_os", LINK_OS_SPEC }, \
|
{ "link_os", LINK_OS_SPEC }, \
|
||||||
+ { "link_os_ogc", LINK_OS_OGC_SPEC }, \
|
+ { "link_os_ogc", LINK_OS_OGC_SPEC }, \
|
||||||
|
+ { "link_os_wup", LINK_OS_WUP_SPEC }, \
|
||||||
{ "link_os_ads", LINK_OS_ADS_SPEC }, \
|
{ "link_os_ads", LINK_OS_ADS_SPEC }, \
|
||||||
{ "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
|
{ "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \
|
||||||
{ "link_os_mvme", LINK_OS_MVME_SPEC }, \
|
{ "link_os_mvme", LINK_OS_MVME_SPEC }, \
|
||||||
@@ -984,6 +1016,9 @@
|
@@ -905,6 +937,10 @@
|
||||||
{ "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \
|
{ "link_os_default", LINK_OS_DEFAULT_SPEC }, \
|
||||||
{ "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \
|
|
||||||
{ "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
|
{ "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \
|
||||||
|
{ "link_secure_plt", LINK_SECURE_PLT_SPEC }, \
|
||||||
+ { "cpp_os_gcn", CPP_OS_GCN_SPEC }, \
|
+ { "cpp_os_gcn", CPP_OS_GCN_SPEC }, \
|
||||||
+ { "cpp_os_ogc", CPP_OS_OGC_SPEC }, \
|
+ { "cpp_os_ogc", CPP_OS_OGC_SPEC }, \
|
||||||
+ { "cpp_os_rvl", CPP_OS_RVL_SPEC }, \
|
+ { "cpp_os_rvl", CPP_OS_RVL_SPEC }, \
|
||||||
|
+ { "cpp_os_wup", CPP_OS_WUP_SPEC }, \
|
||||||
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
|
{ "cpp_os_ads", CPP_OS_ADS_SPEC }, \
|
||||||
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
|
{ "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \
|
||||||
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
{ "cpp_os_mvme", CPP_OS_MVME_SPEC }, \
|
||||||
diff -Nbaur gcc-4.6.3/gcc/config/rs6000/sysv4.opt gcc-4.6.3-ppc/gcc/config/rs6000/sysv4.opt
|
diff -NBaur gcc-6.1.0/gcc/config/rs6000/sysv4.opt gcc-6.1.0-ppc/gcc/config/rs6000/sysv4.opt
|
||||||
--- gcc-4.6.3/gcc/config/rs6000/sysv4.opt 2011-01-03 20:52:22.000000000 +0000
|
--- gcc-6.1.0/gcc/config/rs6000/sysv4.opt 2016-01-04 14:30:50.000000000 +0000
|
||||||
+++ gcc-4.6.3-ppc/gcc/config/rs6000/sysv4.opt 2012-04-21 22:54:04.000000000 +0100
|
+++ gcc-6.1.0-ppc/gcc/config/rs6000/sysv4.opt 2016-05-20 12:10:24.649019640 +0100
|
||||||
@@ -108,6 +108,26 @@
|
@@ -120,6 +120,30 @@
|
||||||
Target RejectNegative
|
Target RejectNegative
|
||||||
Link with libads.a, libc.a and crt0.o
|
Link with libads.a, libc.a and crt0.o.
|
||||||
|
|
||||||
+mgcn
|
+mgcn
|
||||||
+Target RejectNegative
|
+Target RejectNegative
|
||||||
@@ -206,26 +224,44 @@ diff -Nbaur gcc-4.6.3/gcc/config/rs6000/sysv4.opt gcc-4.6.3-ppc/gcc/config/rs600
|
|||||||
+mrvl
|
+mrvl
|
||||||
+Target RejectNegative
|
+Target RejectNegative
|
||||||
+Link with libsysbase.a and libc.a, use rvl linker script
|
+Link with libsysbase.a and libc.a, use rvl linker script
|
||||||
|
+
|
||||||
|
+mwup
|
||||||
|
+Target RejectNegative
|
||||||
|
+Link with libsysbase.a and libc.a, use wup linker script
|
||||||
+
|
+
|
||||||
myellowknife
|
myellowknife
|
||||||
Target RejectNegative
|
Target RejectNegative
|
||||||
Link with libyk.a, libc.a and crt0.o
|
Link with libyk.a, libc.a and crt0.o.
|
||||||
diff -Nbaur gcc-4.6.3/gcc/config.gcc gcc-4.6.3-ppc/gcc/config.gcc
|
diff -NBaur gcc-6.1.0/gcc/config.gcc gcc-6.1.0-ppc/gcc/config.gcc
|
||||||
--- gcc-4.6.3/gcc/config.gcc 2011-07-22 17:44:50.000000000 +0100
|
--- gcc-6.1.0/gcc/config.gcc 2016-04-11 11:14:59.000000000 +0100
|
||||||
+++ gcc-4.6.3-ppc/gcc/config.gcc 2012-04-21 22:54:04.000000000 +0100
|
+++ gcc-6.1.0-ppc/gcc/config.gcc 2016-05-20 12:10:24.661019640 +0100
|
||||||
@@ -2133,7 +2133,7 @@
|
@@ -2381,7 +2381,7 @@
|
||||||
use_gcc_stdint=wrap
|
use_gcc_stdint=wrap
|
||||||
;;
|
;;
|
||||||
powerpc-*-eabi*)
|
powerpc-*-eabi*)
|
||||||
- tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
|
- tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h"
|
||||||
+ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/750cl.h"
|
+ tm_file="${tm_file} dbxelf.h elfos.h usegas.h freebsd-spec.h newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/750cl.h"
|
||||||
extra_options="${extra_options} rs6000/sysv4.opt"
|
extra_options="${extra_options} rs6000/sysv4.opt"
|
||||||
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-ppcgas rs6000/t-ppccomm"
|
tmake_file="rs6000/t-fprules rs6000/t-ppcgas rs6000/t-ppccomm"
|
||||||
use_gcc_stdint=wrap
|
use_gcc_stdint=wrap
|
||||||
diff -Nbaur gcc-4.6.3/libcpp/Makefile.in gcc-4.6.3-ppc/libcpp/Makefile.in
|
diff -NBaur gcc-6.1.0/gcc/Makefile.in gcc-6.1.0-ppc/gcc/Makefile.in
|
||||||
--- gcc-4.6.3/libcpp/Makefile.in 2012-03-01 12:03:46.000000000 +0000
|
--- gcc-6.1.0/gcc/Makefile.in 2016-04-15 12:49:39.000000000 +0100
|
||||||
+++ gcc-4.6.3-ppc/libcpp/Makefile.in 2012-04-21 22:54:04.000000000 +0100
|
+++ gcc-6.1.0-ppc/gcc/Makefile.in 2016-05-20 12:10:24.641019640 +0100
|
||||||
@@ -212,8 +212,7 @@
|
@@ -1073,8 +1073,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-6.1.0/libcpp/Makefile.in gcc-6.1.0-ppc/libcpp/Makefile.in
|
||||||
|
--- gcc-6.1.0/libcpp/Makefile.in 2016-04-27 09:22:11.000000000 +0100
|
||||||
|
+++ gcc-6.1.0-ppc/libcpp/Makefile.in 2016-05-20 12:10:24.661019640 +0100
|
||||||
|
@@ -208,8 +208,7 @@
|
||||||
# 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.
|
||||||
@@ -235,3 +271,60 @@ diff -Nbaur gcc-4.6.3/libcpp/Makefile.in gcc-4.6.3-ppc/libcpp/Makefile.in
|
|||||||
else
|
else
|
||||||
COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
|
COMPILE = source='$<' object='$@' libtool=no DEPDIR=$(DEPDIR) $(DEPMODE) \
|
||||||
$(depcomp) $(COMPILE.base)
|
$(depcomp) $(COMPILE.base)
|
||||||
|
diff -NBaur gcc-6.1.0/libgcc/config/rs6000/crtrestvr.S gcc-6.1.0-ppc/libgcc/config/rs6000/crtrestvr.S
|
||||||
|
--- gcc-6.1.0/libgcc/config/rs6000/crtrestvr.S 2016-01-04 14:30:50.000000000 +0000
|
||||||
|
+++ gcc-6.1.0-ppc/libgcc/config/rs6000/crtrestvr.S 2016-05-20 12:10:24.665019640 +0100
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
|
||||||
|
/* On PowerPC64 Linux, these functions are provided by the linker. */
|
||||||
|
#ifndef __powerpc64__
|
||||||
|
-
|
||||||
|
+#if 0
|
||||||
|
#undef __ALTIVEC__
|
||||||
|
#define __ALTIVEC__ 1
|
||||||
|
#include "ppc-asm.h"
|
||||||
|
@@ -85,3 +85,4 @@
|
||||||
|
CFI_ENDPROC
|
||||||
|
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
diff -NBaur gcc-6.1.0/libgcc/config/rs6000/crtsavevr.S gcc-6.1.0-ppc/libgcc/config/rs6000/crtsavevr.S
|
||||||
|
--- gcc-6.1.0/libgcc/config/rs6000/crtsavevr.S 2016-01-04 14:30:50.000000000 +0000
|
||||||
|
+++ gcc-6.1.0-ppc/libgcc/config/rs6000/crtsavevr.S 2016-05-20 12:10:24.665019640 +0100
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
|
||||||
|
/* On PowerPC64 Linux, these functions are provided by the linker. */
|
||||||
|
#ifndef __powerpc64__
|
||||||
|
-
|
||||||
|
+#if 0
|
||||||
|
#undef __ALTIVEC__
|
||||||
|
#define __ALTIVEC__ 1
|
||||||
|
#include "ppc-asm.h"
|
||||||
|
@@ -85,3 +85,4 @@
|
||||||
|
CFI_ENDPROC
|
||||||
|
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
diff -NBaur gcc-6.1.0/libgcc/crtstuff.c gcc-6.1.0-ppc/libgcc/crtstuff.c
|
||||||
|
--- gcc-6.1.0/libgcc/crtstuff.c 2016-01-04 14:30:50.000000000 +0000
|
||||||
|
+++ gcc-6.1.0-ppc/libgcc/crtstuff.c 2016-05-20 12:10:24.669019640 +0100
|
||||||
|
@@ -47,6 +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,
|
||||||
|
diff -NBaur gcc-6.1.0/libstdc++-v3/include/std/type_traits gcc-6.1.0-ppc/libstdc++-v3/include/std/type_traits
|
||||||
|
--- gcc-6.1.0/libstdc++-v3/include/std/type_traits 2016-01-12 21:19:58.000000000 +0000
|
||||||
|
+++ gcc-6.1.0-ppc/libstdc++-v3/include/std/type_traits 2016-05-20 12:10:24.669019640 +0100
|
||||||
|
@@ -38,7 +38,7 @@
|
||||||
|
#include <bits/c++config.h>
|
||||||
|
|
||||||
|
#ifdef _GLIBCXX_USE_C99_STDINT_TR1
|
||||||
|
-# if defined (__UINT_LEAST16_TYPE__) && defined(__UINT_LEAST32_TYPE__)
|
||||||
|
+# if defined (__UINT_LEAST16_TYPE__) && defined(__UINT_LEAST32_TYPE__) && 0
|
||||||
|
namespace std
|
||||||
|
{
|
||||||
|
typedef __UINT_LEAST16_TYPE__ uint_least16_t;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
diff -Nbaur gdb-7.4/gdb/Makefile.in gdb-7.4-ppc/gdb/Makefile.in
|
diff -NBaur gdb-7.10/gdb/Makefile.in gdb-7.10-ppc/gdb/Makefile.in
|
||||||
--- gdb-7.4/gdb/Makefile.in 2012-01-06 04:43:01.000000000 +0000
|
--- gdb-7.10/gdb/Makefile.in 2015-08-28 22:22:07.000000000 +0100
|
||||||
+++ gdb-7.4-ppc/gdb/Makefile.in 2012-01-28 15:56:00.000000000 +0000
|
+++ gdb-7.10-ppc/gdb/Makefile.in 2015-11-09 09:21:13.228003995 +0000
|
||||||
@@ -2195,10 +2195,10 @@
|
@@ -2676,10 +2676,10 @@
|
||||||
# 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.
|
||||||
@@ -16,15 +16,3 @@ diff -Nbaur gdb-7.4/gdb/Makefile.in gdb-7.4-ppc/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.4/sim/ppc/Makefile.in gdb-7.4-ppc/sim/ppc/Makefile.in
|
|
||||||
--- gdb-7.4/sim/ppc/Makefile.in 2009-09-16 00:26:44.000000000 +0100
|
|
||||||
+++ gdb-7.4-ppc/sim/ppc/Makefile.in 2012-02-25 13:30:02.000000000 +0000
|
|
||||||
@@ -551,7 +551,7 @@
|
|
||||||
PACKAGE_OBJ = @sim_pk_obj@
|
|
||||||
|
|
||||||
|
|
||||||
-psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBS) $(LIBINTL_DEP)
|
|
||||||
+psim: $(TARGETLIB) main.o $(LIBIBERTY_LIB) $(BFD_LIB) $(LIBINTL_DEP)
|
|
||||||
$(CC) $(CFLAGS) $(SIM_CFLAGS) $(LDFLAGS) -o psim$(EXEEXT) main.o $(TARGETLIB) $(BFD_LIB) $(LIBINTL) $(LIBIBERTY_LIB) $(LIBS)
|
|
||||||
|
|
||||||
run: psim
|
|
||||||
File diff suppressed because it is too large
Load Diff
12
dkppc/rules/wiiu_rules
Normal file
12
dkppc/rules/wiiu_rules
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
ifeq ($(strip $(DEVKITPPC)),)
|
||||||
|
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPro/devkitPPC)
|
||||||
|
endif
|
||||||
|
|
||||||
|
MACHDEP = -DESPRESSO -mwup -mcpu=750 -meabi -mhard-float
|
||||||
|
|
||||||
|
include $(DEVKITPPC)/base_rules
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
%.elf:
|
||||||
|
@echo linking ... $(notdir $@)
|
||||||
|
@$(LD) $^ $(LDFLAGS) $(LIBPATHS) $(LIBS) -o $@
|
||||||
12
dkppc/scripts/build-gcc.sh
Normal file → Executable file
12
dkppc/scripts/build-gcc.sh
Normal file → Executable file
@@ -16,7 +16,7 @@ then
|
|||||||
--prefix=$prefix --target=$target --disable-nls --disable-shared --disable-debug \
|
--prefix=$prefix --target=$target --disable-nls --disable-shared --disable-debug \
|
||||||
--disable-werror \
|
--disable-werror \
|
||||||
--enable-poison-system-directories \
|
--enable-poison-system-directories \
|
||||||
--enable-plugins --enable-lto --disable-dependency-tracking \
|
--enable-plugins --enable-lto \
|
||||||
--disable-werror $CROSS_PARAMS \
|
--disable-werror $CROSS_PARAMS \
|
||||||
|| { echo "Error configuing ppc binutils"; exit 1; }
|
|| { echo "Error configuing ppc binutils"; exit 1; }
|
||||||
touch configured-binutils
|
touch configured-binutils
|
||||||
@@ -47,7 +47,6 @@ if [ ! -f configured-binutils ]
|
|||||||
then
|
then
|
||||||
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
|
CFLAGS=$cflags LDFLAGS=$ldflags ../../binutils-$BINUTILS_VER/configure \
|
||||||
--prefix=$prefix --target=mn10200 --disable-nls --disable-debug \
|
--prefix=$prefix --target=mn10200 --disable-nls --disable-debug \
|
||||||
--disable-dependency-tracking \
|
|
||||||
--disable-werror $CROSS_PARAMS \
|
--disable-werror $CROSS_PARAMS \
|
||||||
|| { echo "Error configuing mn10200 binutils"; exit 1; }
|
|| { echo "Error configuing mn10200 binutils"; exit 1; }
|
||||||
touch configured-binutils
|
touch configured-binutils
|
||||||
@@ -75,19 +74,20 @@ cd $target/gcc
|
|||||||
|
|
||||||
if [ ! -f configured-gcc ]
|
if [ ! -f configured-gcc ]
|
||||||
then
|
then
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
CFLAGS="$cflags" CXXFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" CXXFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \
|
||||||
--enable-languages=c,c++,objc \
|
--enable-languages=c,c++,objc \
|
||||||
--enable-lto $plugin_ld \
|
--enable-lto $plugin_ld \
|
||||||
--with-cpu=750 \
|
--with-cpu=750 \
|
||||||
--disable-nls --disable-shared --enable-threads --disable-multilib \
|
--disable-nls --disable-shared --enable-threads --disable-multilib \
|
||||||
--disable-win32-registry \
|
--disable-win32-registry \
|
||||||
--disable-libstdcxx-pch \
|
--disable-libstdcxx-pch \
|
||||||
|
--disable-libstdcxx-verbose \
|
||||||
|
--enable-cxx-flags='-ffunction-sections -fdata-sections' \
|
||||||
--target=$target \
|
--target=$target \
|
||||||
--with-newlib \
|
--with-newlib \
|
||||||
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
||||||
--prefix=$prefix\
|
--prefix=$prefix\
|
||||||
--disable-dependency-tracking \
|
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPPC release 28" \
|
||||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPPC release 26" \
|
|
||||||
$CROSS_PARAMS \
|
$CROSS_PARAMS \
|
||||||
|| { echo "Error configuring gcc stage 1"; exit 1; }
|
|| { echo "Error configuring gcc stage 1"; exit 1; }
|
||||||
touch configured-gcc
|
touch configured-gcc
|
||||||
@@ -170,7 +170,7 @@ cd $target/gdb
|
|||||||
if [ ! -f configured-gdb ]
|
if [ ! -f configured-gdb ]
|
||||||
then
|
then
|
||||||
CFLAGS="$cflags" LDFLAGS="$ldflags" ../../gdb-$GDB_VER/configure \
|
CFLAGS="$cflags" LDFLAGS="$ldflags" ../../gdb-$GDB_VER/configure \
|
||||||
--disable-nls --prefix=$prefix --target=$target --disable-werror --disable-dependency-tracking\
|
--disable-nls --prefix=$prefix --target=$target --disable-werror \
|
||||||
$CROSS_PARAMS || { echo "Error configuring gdb"; exit 1; }
|
$CROSS_PARAMS || { echo "Error configuring gdb"; exit 1; }
|
||||||
touch configured-gdb
|
touch configured-gdb
|
||||||
fi
|
fi
|
||||||
|
|||||||
32
select_toolchain.sh
Normal file → Executable file
32
select_toolchain.sh
Normal file → Executable file
@@ -1,5 +1,17 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
VERSION=0
|
VERSION=0
|
||||||
|
case "$BUILD_DKPRO_PACKAGE" in
|
||||||
|
"1" )
|
||||||
|
VERSION=1
|
||||||
|
;;
|
||||||
|
"2" )
|
||||||
|
VERSION=2
|
||||||
|
;;
|
||||||
|
"3" )
|
||||||
|
VERSION=3
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
while [ $VERSION -eq 0 ]
|
while [ $VERSION -eq 0 ]
|
||||||
do
|
do
|
||||||
echo
|
echo
|
||||||
@@ -18,20 +30,20 @@ done
|
|||||||
|
|
||||||
case "$VERSION" in
|
case "$VERSION" in
|
||||||
"1" )
|
"1" )
|
||||||
GCC_VER=4.7.0
|
GCC_VER=5.3.0
|
||||||
BINUTILS_VER=2.22
|
BINUTILS_VER=2.25.1
|
||||||
NEWLIB_VER=1.20.0
|
NEWLIB_VER=2.2.0
|
||||||
GDB_VER=7.4
|
GDB_VER=7.10
|
||||||
basedir='dkarm-eabi'
|
basedir='dkarm-eabi'
|
||||||
package=devkitARM
|
package=devkitARM
|
||||||
target=arm-eabi
|
target=arm-none-eabi
|
||||||
toolchain=DEVKITARM
|
toolchain=DEVKITARM
|
||||||
;;
|
;;
|
||||||
"2" )
|
"2" )
|
||||||
GCC_VER=4.6.3
|
GCC_VER=6.2.0
|
||||||
BINUTILS_VER=2.22
|
BINUTILS_VER=2.27
|
||||||
NEWLIB_VER=1.20.0
|
NEWLIB_VER=2.0.0
|
||||||
GDB_VER=7.4
|
GDB_VER=7.11
|
||||||
basedir='dkppc'
|
basedir='dkppc'
|
||||||
package=devkitPPC
|
package=devkitPPC
|
||||||
target=powerpc-eabi
|
target=powerpc-eabi
|
||||||
@@ -47,4 +59,4 @@ case "$VERSION" in
|
|||||||
target=psp
|
target=psp
|
||||||
toolchain=DEVKITPSP
|
toolchain=DEVKITPSP
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ do
|
|||||||
then
|
then
|
||||||
$HOST_STRIP $f
|
$HOST_STRIP $f
|
||||||
fi
|
fi
|
||||||
|
if [[ "$f" == *.dll ]]
|
||||||
|
then
|
||||||
|
$HOST_STRIP -d $f
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $VERSION -eq 2 ]; then
|
if [ $VERSION -eq 2 ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user