mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-08-21 01:44:16 -05:00
Compare commits
14 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f7de61f3c9 | ||
|
|
e897a44640 | ||
|
|
e0caf9ea02 | ||
|
|
e454bd0dd7 | ||
|
|
ac53b3f62f | ||
|
|
bb77177e7b | ||
|
|
00dfc2dbbb | ||
|
|
98596aad6d | ||
|
|
2f10349942 | ||
|
|
ae01482942 | ||
|
|
b8b237c88d | ||
|
|
2ebf134e6f | ||
|
|
1689594d0a | ||
|
|
ccae1fd3bc |
19
README.TXT
19
README.TXT
@@ -3,27 +3,20 @@ devkitPro build 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 minsys developer toolkit
|
||||
|
||||
http://prdownloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?download
|
||||
|
||||
Bison, Flex and Wget from the gnuwin32 project
|
||||
|
||||
http://sourceforge.net/projects/gnuwin32/
|
||||
|
||||
The windows versions of the toolchains are now cross compiled on linux using mingw-w64
|
||||
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://www.mpfr.org/
|
||||
http://www.multiprecision.org/
|
||||
|
||||
Some of the tools for devkitARM and devkitPPC also require FreeImage, zlib, and libusb
|
||||
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://www.zlib.net
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
#---------------------------------------------------------------------------------
|
||||
# Build scripts for
|
||||
# devkitARM release 42
|
||||
# devkitARM release 43
|
||||
# devkitPPC release 27
|
||||
# devkitPSP release 17
|
||||
#---------------------------------------------------------------------------------
|
||||
@@ -27,6 +27,7 @@ echo
|
||||
LIBOGC_VER=1.8.12
|
||||
LIBGBA_VER=20090222
|
||||
LIBNDS_VER=1.5.8
|
||||
LIBCTRU_VER=0.1.0
|
||||
DEFAULT_ARM7_VER=0.5.24
|
||||
DSWIFI_VER=0.3.16
|
||||
LIBMIRKO_VER=0.9.7
|
||||
@@ -45,8 +46,9 @@ GCDSPSUITE_VER=1.4.0
|
||||
ELF2DOL_VER=1.0.0
|
||||
WIILOAD_VER=0.5.1
|
||||
MMUTIL_VER=1.8.6
|
||||
DFU_UTIL_VER=0.7
|
||||
STLINK_VER=0.5.7
|
||||
DFU_UTIL_VER=0.7.1
|
||||
STLINK_VER=0.5.8
|
||||
TOOLS3DS_VER=1.0.0
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
function extract_and_patch {
|
||||
@@ -195,10 +197,10 @@ if [ $VERSION -eq 1 ]; then
|
||||
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
|
||||
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 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"
|
||||
dfu-util-$DFU_UTIL_VER.tar.bz2 stlink-$STLINK_VER.tar.bz2 3dstools-$TOOLS3DS_VER.tar.bz2"
|
||||
fi
|
||||
|
||||
if [ $VERSION -eq 2 ]; then
|
||||
|
||||
162
dkarm-eabi/crtls/3dsx.ld
Normal file
162
dkarm-eabi/crtls/3dsx.ld
Normal file
@@ -0,0 +1,162 @@
|
||||
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 =========== */
|
||||
|
||||
. = 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
|
||||
|
||||
.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);
|
||||
} : 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
|
||||
|
||||
*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,159 +0,0 @@
|
||||
diff -Nbaur gcc-4.8.2/gcc/config/arm/t-arm-elf gcc-4.8.2-arm/gcc/config/arm/t-arm-elf
|
||||
--- gcc-4.8.2/gcc/config/arm/t-arm-elf 2013-01-10 20:38:27.000000000 +0000
|
||||
+++ gcc-4.8.2-arm/gcc/config/arm/t-arm-elf 2014-02-16 19:36:15.000000000 +0000
|
||||
@@ -25,22 +25,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*
|
||||
|
||||
@@ -48,9 +70,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.8.2/gcc/config/arm/unknown-elf.h gcc-4.8.2-arm/gcc/config/arm/unknown-elf.h
|
||||
--- gcc-4.8.2/gcc/config/arm/unknown-elf.h 2013-01-10 20:38:27.000000000 +0000
|
||||
+++ gcc-4.8.2-arm/gcc/config/arm/unknown-elf.h 2014-02-16 19:36:15.000000000 +0000
|
||||
@@ -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-4.8.2/gcc/gcc.c gcc-4.8.2-arm/gcc/gcc.c
|
||||
--- gcc-4.8.2/gcc/gcc.c 2013-05-17 13:24:26.000000000 +0100
|
||||
+++ gcc-4.8.2-arm/gcc/gcc.c 2014-02-16 19:36:15.000000000 +0000
|
||||
@@ -599,6 +599,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 \
|
||||
@@ -785,6 +790,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;
|
||||
@@ -1274,6 +1280,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.8.2/libcpp/Makefile.in gcc-4.8.2-arm/libcpp/Makefile.in
|
||||
--- gcc-4.8.2/libcpp/Makefile.in 2013-10-16 08:27:58.000000000 +0100
|
||||
+++ gcc-4.8.2-arm/libcpp/Makefile.in 2014-02-16 19:36:15.000000000 +0000
|
||||
@@ -207,8 +207,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.8.2/libgcc/config/arm/t-bpabi gcc-4.8.2-arm/libgcc/config/arm/t-bpabi
|
||||
--- gcc-4.8.2/libgcc/config/arm/t-bpabi 2012-08-17 16:06:06.000000000 +0100
|
||||
+++ gcc-4.8.2-arm/libgcc/config/arm/t-bpabi 2014-02-16 19:36:15.000000000 +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-4.8.2/libgcc/crtstuff.c gcc-4.8.2-arm/libgcc/crtstuff.c
|
||||
--- gcc-4.8.2/libgcc/crtstuff.c 2013-02-04 19:06:20.000000000 +0000
|
||||
+++ gcc-4.8.2-arm/libgcc/crtstuff.c 2014-02-16 19:36:15.000000000 +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-4.8.2/libgcc/Makefile.in gcc-4.8.2-arm/libgcc/Makefile.in
|
||||
--- gcc-4.8.2/libgcc/Makefile.in 2013-02-04 19:06:20.000000000 +0000
|
||||
+++ gcc-4.8.2-arm/libgcc/Makefile.in 2014-02-16 19:36:15.000000000 +0000
|
||||
@@ -813,7 +813,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)
|
||||
|
||||
8917
dkarm-eabi/patches/gcc-4.9.2.patch
Normal file
8917
dkarm-eabi/patches/gcc-4.9.2.patch
Normal file
File diff suppressed because it is too large
Load Diff
32
dkarm-eabi/patches/gdb-7.7.1.patch
Normal file
32
dkarm-eabi/patches/gdb-7.7.1.patch
Normal file
@@ -0,0 +1,32 @@
|
||||
diff -Nbaur gdb-7.7.1/gdb/Makefile.in gdb-7.7.1-arm/gdb/Makefile.in
|
||||
--- gdb-7.7.1/gdb/Makefile.in 2014-05-05 22:51:24.000000000 +0100
|
||||
+++ gdb-7.7.1-arm/gdb/Makefile.in 2014-05-18 17:05:16.105567001 +0100
|
||||
@@ -2307,10 +2307,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@override COMPILE.pre = source='$<' object='$@' libtool=no \
|
||||
@GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
|
||||
diff -Nbaur gdb-7.7.1/sim/common/Make-common.in gdb-7.7.1-arm/sim/common/Make-common.in
|
||||
--- gdb-7.7.1/sim/common/Make-common.in 2014-01-08 09:23:36.000000000 +0000
|
||||
+++ gdb-7.7.1-arm/sim/common/Make-common.in 2014-05-18 17:05:16.105567001 +0100
|
||||
@@ -415,10 +415,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@override COMPILE.pre = source='$<' object='$@' libtool=no \
|
||||
@GMAKE_TRUE@ DEPDIR=$(DEPDIR) $(DEPMODE) $(depcomp) $(CC)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11308,7 +11308,7 @@ diff -Nbaur newlib-2.1.0/newlib/libc/include/sys/param.h newlib-2.1.0-arm/newlib
|
||||
#endif
|
||||
#ifndef PATHSIZE
|
||||
-# define PATHSIZE (1024)
|
||||
+# define PATHSIZE (4096)
|
||||
+# define PATHSIZE (1024)
|
||||
#endif
|
||||
|
||||
#define MAXPATHLEN PATH_MAX
|
||||
@@ -11360,13 +11360,13 @@ diff -Nbaur newlib-2.1.0/newlib/libc/include/sys/syslimits.h newlib-2.1.0-arm/ne
|
||||
#define MAX_CANON 255 /* max bytes in term canon input line */
|
||||
#define MAX_INPUT 255 /* max bytes in terminal input */
|
||||
-#define NAME_MAX 255 /* max bytes in a file name */
|
||||
+#define NAME_MAX 767 /* max bytes in a file name */
|
||||
+#define NAME_MAX 255 /* max bytes in a file name */
|
||||
#define NGROUPS_MAX 16 /* max supplemental group id's */
|
||||
#ifndef OPEN_MAX
|
||||
#define OPEN_MAX 64 /* max open files per process */
|
||||
#endif
|
||||
-#define PATH_MAX 1024 /* max bytes in pathname */
|
||||
+#define PATH_MAX 4096 /* max bytes in pathname */
|
||||
+#define PATH_MAX 1024 /* max bytes in pathname */
|
||||
#define PIPE_BUF 512 /* max bytes for atomic pipe writes */
|
||||
#define IOV_MAX 1024 /* max elements in i/o vector */
|
||||
|
||||
@@ -11531,7 +11531,7 @@ diff -Nbaur newlib-2.1.0/newlib/libc/sys/arm/sys/param.h newlib-2.1.0-arm/newlib
|
||||
# define HZ (100)
|
||||
# define NOFILE (60)
|
||||
-# define PATHSIZE (1024)
|
||||
+# define PATHSIZE (4096)
|
||||
+# define PATHSIZE (1024)
|
||||
+# define MAXPATHLEN PATHSIZE
|
||||
|
||||
#define BIG_ENDIAN 4321
|
||||
|
||||
39
dkarm-eabi/rules/3ds_rules
Normal file
39
dkarm-eabi/rules/3ds_rules
Normal file
@@ -0,0 +1,39 @@
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPro)
|
||||
endif
|
||||
|
||||
include $(DEVKITARM)/base_rules
|
||||
|
||||
CTRULIB := $(DEVKITPRO)/libctru
|
||||
|
||||
ifeq ($(strip $(APP_TITLE)),)
|
||||
APP_TITLE := $(notdir $(OUTPUT))
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(APP_DESCRIPTION)),)
|
||||
APP_DESCRIPTION := Built with devkitARM & ctrulib
|
||||
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 $< $@
|
||||
@echo built ... $(notdir $@)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
%.elf:
|
||||
@echo linking $(notdir $@)
|
||||
@$(LD) $(LDFLAGS) $(OFILES) $(LIBPATHS) $(LIBS) -o $@
|
||||
@$(NM) -CSn $@ > $(notdir $*.lst)
|
||||
@@ -21,6 +21,7 @@ $MAKE CRT=gp32_gpsdk
|
||||
$MAKE CRT=ds_arm7
|
||||
$MAKE CRT=ds_arm9
|
||||
$MAKE CRT=ds_cart
|
||||
$MAKE CRT=3dsx
|
||||
|
||||
cd $BUILDDIR/libgba-$LIBGBA_VER
|
||||
$MAKE || { echo "error building libgba"; exit 1; }
|
||||
@@ -53,3 +54,8 @@ $MAKE install || { echo "error installing libmirko"; exit 1; }
|
||||
cd $BUILDDIR/libfilesystem-$FILESYSTEM_VER
|
||||
$MAKE || { echo "error building 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; }
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ then
|
||||
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
||||
--prefix=$prefix \
|
||||
--enable-lto $plugin_ld\
|
||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 42" \
|
||||
--with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitARM release 43" \
|
||||
$CROSS_PARAMS \
|
||||
|| { echo "Error configuring gcc"; exit 1; }
|
||||
touch configured-gcc
|
||||
@@ -88,6 +88,8 @@ then
|
||||
--disable-newlib-supplied-syscalls \
|
||||
--enable-newlib-mb \
|
||||
--enable-newlib-io-long-long \
|
||||
--enable-newlib-io-c99-formats \
|
||||
--enable-newlib-io-pos-args \
|
||||
--target=$target \
|
||||
--prefix=$prefix \
|
||||
|| { echo "Error configuring newlib"; exit 1; }
|
||||
|
||||
@@ -30,10 +30,10 @@ done
|
||||
|
||||
case "$VERSION" in
|
||||
"1" )
|
||||
GCC_VER=4.8.2
|
||||
GCC_VER=4.9.2
|
||||
BINUTILS_VER=2.24
|
||||
NEWLIB_VER=2.1.0
|
||||
GDB_VER=7.7
|
||||
GDB_VER=7.7.1
|
||||
basedir='dkarm-eabi'
|
||||
package=devkitARM
|
||||
target=arm-none-eabi
|
||||
|
||||
Reference in New Issue
Block a user