mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-03-26 20:05:04 -05:00
remove old arm-elf scripts
This commit is contained in:
parent
c610e2dc59
commit
5f07728304
|
|
@ -6,14 +6,12 @@
|
|||
#---------------------------------------------------------------------------------
|
||||
# specify some urls to download the source packages from
|
||||
#---------------------------------------------------------------------------------
|
||||
NEWLIB_VER=1.14.0
|
||||
LIBOGC_VER=20050812
|
||||
LIBGBA_VER=20060601
|
||||
LIBNDS_VER=20060601
|
||||
LIBMIRKO_VER=0.9.6
|
||||
ELF2FLT_VER=20060506
|
||||
|
||||
NEWLIB="newlib-$NEWLIB_VER.tar.gz"
|
||||
LIBOGC="libogc-src-$LIBOGC_VER.tar.bz2"
|
||||
LIBGBA="libgba-src-$LIBGBA_VER.tar.bz2"
|
||||
LIBNDS="libnds-src-$LIBNDS_VER.tar.bz2"
|
||||
|
|
@ -26,8 +24,17 @@ LIBGBA_URL="http://$SFMIRROR.dl.sourceforge.net/sourceforge/devkitpro/$LIBGBA"
|
|||
LIBNDS_URL="http://$SFMIRROR.dl.sourceforge.net/sourceforge/devkitpro/$LIBNDS"
|
||||
LIBMIRKO_URL="http://$SFMIRROR.dl.sourceforge.net/sourceforge/devkitpro/$LIBMIRKO"
|
||||
ELF2FLT_URL="http://$SFMIRROR.dl.sourceforge.net/sourceforge/devkitpro/$ELF2FLT"
|
||||
|
||||
|
||||
NEWLIB_VER=1.14.0
|
||||
NEWLIB="newlib-$NEWLIB_VER.tar.gz"
|
||||
NEWLIB_URL="ftp://sources.redhat.com/pub/newlib/$NEWLIB"
|
||||
|
||||
BINUTILS_VER=2.17
|
||||
BINUTILS="binutils-$BINUTILS_VER.tar.bz2"
|
||||
BINUTILS_URL="http://ftp.gnu.org/gnu/binutils/$BINUTILS"
|
||||
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# Ask whether to download the source packages or not
|
||||
#---------------------------------------------------------------------------------
|
||||
|
|
@ -42,10 +49,9 @@ do
|
|||
echo "1: build devkitARM (gba gp32 ds)"
|
||||
echo "2: build devkitPPC (gamecube)"
|
||||
echo "3: build devkitPSP (PSP)"
|
||||
echo "4: build devkitARM eabi (gba gp32 ds)"
|
||||
read VERSION
|
||||
|
||||
if [ "$VERSION" -ne 1 -a "$VERSION" -ne 2 -a "$VERSION" -ne 3 -a "$VERSION" -ne 4 ]
|
||||
if [ "$VERSION" -ne 1 -a "$VERSION" -ne 2 -a "$VERSION" -ne 3 ]
|
||||
then
|
||||
VERSION=0
|
||||
fi
|
||||
|
|
@ -63,24 +69,14 @@ GCC_GPP="gcc-g++-$GCC_VER.tar.bz2"
|
|||
GCC_CORE_URL="http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/$GCC_CORE"
|
||||
GCC_GPP_URL="http://ftp.gnu.org/gnu/gcc/gcc-$GCC_VER/$GCC_GPP"
|
||||
|
||||
if [ $VERSION -eq 4 ]
|
||||
then
|
||||
BINUTILS_VER=2.16.93
|
||||
BINUTILS="binutils-$BINUTILS_VER.tar.bz2"
|
||||
BINUTILS_URL="ftp://sourceware.org/pub/binutils/snapshots/$BINUTILS"
|
||||
else
|
||||
BINUTILS_VER=2.16.1
|
||||
BINUTILS="binutils-$BINUTILS_VER.tar.bz2"
|
||||
BINUTILS_URL="http://ftp.gnu.org/gnu/binutils/$BINUTILS"
|
||||
fi
|
||||
|
||||
|
||||
if [ $VERSION -eq 1 ]
|
||||
then
|
||||
basedir='dkarm'
|
||||
basedir='dkarm-eabi'
|
||||
package=devkitARM
|
||||
builddir=arm-elf
|
||||
target=arm-elf
|
||||
builddir=arm-eabi
|
||||
target=arm-eabi
|
||||
toolchain=DEVKITARM
|
||||
fi
|
||||
|
||||
|
|
@ -110,15 +106,6 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ $VERSION -eq 4 ]
|
||||
then
|
||||
basedir='dkarm-eabi'
|
||||
package=devkitARM
|
||||
builddir=arm-eabi
|
||||
target=arm-eabi
|
||||
toolchain=DEVKITARM
|
||||
fi
|
||||
|
||||
DOWNLOAD=0
|
||||
|
||||
while [ $DOWNLOAD -eq 0 ]
|
||||
|
|
@ -202,7 +189,7 @@ then
|
|||
FOUND=1
|
||||
fi
|
||||
|
||||
if [ $VERSION -eq 1 -o $VERSION -eq 4 ]
|
||||
if [ $VERSION -eq 1 ]
|
||||
then
|
||||
if [ ! -f $SRCDIR/$LIBGBA ]
|
||||
then
|
||||
|
|
@ -264,7 +251,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
if [ $VERSION -eq 1 -o $VERSION -eq 4 ]
|
||||
if [ $VERSION -eq 1 ]
|
||||
then
|
||||
$WGET -c $LIBNDS_URL || { echo "Error: Failed to download "$LIBNDS; exit; }
|
||||
$WGET -c $LIBGBA_URL || { echo "Error: Failed to download "$LIBGBA; exit; }
|
||||
|
|
@ -340,7 +327,7 @@ then
|
|||
fi
|
||||
|
||||
|
||||
if [ $VERSION -eq 1 -o $VERSION -eq 4 ]
|
||||
if [ $VERSION -eq 1 ]
|
||||
then
|
||||
echo "Extracting $LIBNDS"
|
||||
mkdir -p $LIBNDS_SRCDIR
|
||||
|
|
@ -401,7 +388,7 @@ rm -fr $BINUTILS_SRCDIR
|
|||
rm -fr $NEWLIB_SRCDIR
|
||||
rm -fr $GCC_SRCDIR
|
||||
|
||||
if [ $VERSION -eq 1 -o $VERSION -eq 4 ]
|
||||
if [ $VERSION -eq 1 ]
|
||||
then
|
||||
rm -fr $LIBOGC_SRCDIR $LIBGBA_SRCDIR $LIBNDS_SRCDIR $LIBMIRKO_SRCDIR
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ diff -Nbaur gcc-4.1.1/gcc/c-incpath.c gcc-4.1.1-arm/gcc/c-incpath.c
|
|||
+++ gcc-4.1.1-arm/gcc/c-incpath.c Mon Jun 5 06:58:56 2006
|
||||
@@ -331,13 +331,18 @@
|
||||
cpp_dir *p;
|
||||
|
||||
|
||||
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
|
||||
- /* Convert all backslashes to slashes. The native CRT stat()
|
||||
- function does not recognize a directory that ends in a backslash
|
||||
|
|
@ -21,11 +21,11 @@ diff -Nbaur gcc-4.1.1/gcc/c-incpath.c gcc-4.1.1-arm/gcc/c-incpath.c
|
|||
+ char* end = path + pathlen - 1;
|
||||
+ /* Preserve the lead '/' or lead "c:/". */
|
||||
+ char* start = path + (pathlen > 2 && path[1] == ':' ? 3 : 1);
|
||||
+
|
||||
+
|
||||
+ for (; end > start && IS_DIR_SEPARATOR (*end); end--)
|
||||
+ *end = 0;
|
||||
#endif
|
||||
|
||||
|
||||
p = xmalloc (sizeof (cpp_dir));
|
||||
diff -Nbaur gcc-4.1.1/gcc/gcc.c gcc-4.1.1-arm/gcc/gcc.c
|
||||
--- gcc-4.1.1/gcc/gcc.c Wed May 17 19:38:58 2006
|
||||
|
|
@ -40,20 +40,20 @@ diff -Nbaur gcc-4.1.1/gcc/gcc.c gcc-4.1.1-arm/gcc/gcc.c
|
|||
else
|
||||
gcc_libexec_prefix = make_relative_prefix (gcc_exec_prefix,
|
||||
@@ -6148,10 +6146,21 @@
|
||||
|
||||
|
||||
/* We need to check standard_exec_prefix/just_machine_suffix/specs
|
||||
for any override of as, ld and libraries. */
|
||||
+ if ( gcc_exec_prefix )
|
||||
+ {
|
||||
+ {
|
||||
+ specs_file = alloca (strlen (gcc_exec_prefix)
|
||||
+ + strlen (just_machine_suffix) + sizeof ("specs"));
|
||||
+
|
||||
+ strcpy (specs_file, gcc_exec_prefix);
|
||||
+ } else {
|
||||
+
|
||||
+
|
||||
specs_file = alloca (strlen (standard_exec_prefix)
|
||||
+ strlen (just_machine_suffix) + sizeof ("specs"));
|
||||
|
||||
|
||||
strcpy (specs_file, standard_exec_prefix);
|
||||
+
|
||||
+ }
|
||||
|
|
@ -67,7 +67,7 @@ diff -Nbaur gcc-4.1.1/gcc/prefix.c gcc-4.1.1-arm/gcc/prefix.c
|
|||
@@ -246,13 +246,16 @@
|
||||
The returned string is always malloc-ed, and the caller is
|
||||
responsible for freeing it. */
|
||||
|
||||
|
||||
+
|
||||
+static const char *old_prefix = PREFIX;
|
||||
+
|
||||
|
|
@ -77,7 +77,7 @@ diff -Nbaur gcc-4.1.1/gcc/prefix.c gcc-4.1.1-arm/gcc/prefix.c
|
|||
char *result, *p;
|
||||
- const int len = strlen (std_prefix);
|
||||
+ const int len = strlen (old_prefix);
|
||||
|
||||
|
||||
- if (! strncmp (path, std_prefix, len)
|
||||
+ if (! strncmp (path, old_prefix, len)
|
||||
&& (IS_DIR_SEPARATOR(path[len])
|
||||
|
|
@ -98,39 +98,39 @@ diff -Nbaur gcc-4.1.1/gcc/toplev.c gcc-4.1.1-arm/gcc/toplev.c
|
|||
#include "alloc-pool.h"
|
||||
#include "tree-mudflap.h"
|
||||
+#include "prefix.h"
|
||||
|
||||
|
||||
#if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO)
|
||||
#include "dwarf2out.h"
|
||||
@@ -1434,6 +1435,10 @@
|
||||
progname = p;
|
||||
|
||||
|
||||
xmalloc_set_program_name (progname);
|
||||
+
|
||||
+ p = getenv("GCC_EXEC_PREFIX");
|
||||
+
|
||||
+ p = getenv("GCC_EXEC_PREFIX");
|
||||
+ if (p && strlen(p)) set_std_prefix (p, strlen(p));
|
||||
+
|
||||
|
||||
|
||||
hex_init ();
|
||||
|
||||
|
||||
diff -Nbaur gcc-4.1.1/gcc/version.c gcc-4.1.1-arm/gcc/version.c
|
||||
--- gcc-4.1.1/gcc/version.c Wed Mar 16 06:04:10 2005
|
||||
+++ gcc-4.1.1-arm/gcc/version.c Wed Jun 7 16:14:31 2006
|
||||
@@ -8,7 +8,7 @@
|
||||
in parentheses. You may also wish to include a number indicating
|
||||
the revision of your modified compiler. */
|
||||
|
||||
|
||||
-#define VERSUFFIX ""
|
||||
+#define VERSUFFIX " (devkitARM release 19a)"
|
||||
|
||||
+#define VERSUFFIX " (devkitARM release 20)"
|
||||
|
||||
/* This is the location of the online document giving instructions for
|
||||
reporting bugs. If you distribute a modified version of GCC,
|
||||
@@ -17,7 +17,7 @@
|
||||
forward us bugs reported to you, if you determine that they are
|
||||
not bugs in your modifications.) */
|
||||
|
||||
|
||||
-const char bug_report_url[] = "<URL:http://gcc.gnu.org/bugs.html>";
|
||||
+const char bug_report_url[] = "<URL:http://devkitpro.sourceforge.net/bugs.shtml>";
|
||||
|
||||
|
||||
/* The complete version string, assembled from several pieces.
|
||||
BASEVER, DATESTAMP, and DEVPHASE are defined by the Makefile. */
|
||||
diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
||||
|
|
@ -141,13 +141,13 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
#include <signal.h>
|
||||
#include <sys/stat.h>
|
||||
+#include <errno.h>
|
||||
|
||||
|
||||
/* mingw32 headers may not define the following. */
|
||||
|
||||
|
||||
@@ -72,115 +73,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
-/* This is a kludge to get around the Microsoft C spawn functions' propensity
|
||||
- to remove the outermost set of double quotes from all arguments. */
|
||||
-
|
||||
|
|
@ -263,7 +263,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
@@ -422,8 +314,225 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+/* Return a Windows command-line from ARGV. It is the caller's
|
||||
+ responsibility to free the string returned. */
|
||||
+
|
||||
|
|
@ -448,9 +448,9 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
+ cmdline = argv_to_cmdline (argv);
|
||||
+ if (!cmdline)
|
||||
+ goto error;
|
||||
+
|
||||
+ /* Create the child process. */
|
||||
+ if (!CreateProcess (full_executable, cmdline,
|
||||
+
|
||||
+ /* Create the child process. */
|
||||
+ if (!CreateProcess (full_executable, cmdline,
|
||||
+ /*lpProcessAttributes=*/NULL,
|
||||
+ /*lpThreadAttributes=*/NULL,
|
||||
+ /*bInheritHandles=*/TRUE,
|
||||
|
|
@ -492,23 +492,23 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
if (!executable)
|
||||
executable = executable1;
|
||||
- pid = _spawnvp (_P_NOWAIT, executable, argv);
|
||||
+ pid = win32_spawn (executable, TRUE, argv,
|
||||
+ pid = win32_spawn (executable, TRUE, argv,
|
||||
+ dwCreationFlags, si, pi);
|
||||
#else
|
||||
if (strchr (executable1, '\\') == NULL)
|
||||
- pid = _spawnvp (_P_NOWAIT, executable1, argv);
|
||||
+ pid = win32_spawn (executable1, TRUE, argv,
|
||||
+ pid = win32_spawn (executable1, TRUE, argv,
|
||||
+ dwCreationFlags, si, pi);
|
||||
else if (executable1[0] != '\\')
|
||||
- pid = _spawnv (_P_NOWAIT, executable1, argv);
|
||||
+ pid = win32_spawn (executable1, FALSE, argv,
|
||||
+ pid = win32_spawn (executable1, FALSE, argv,
|
||||
+ dwCreationFlags, si, pi);
|
||||
else
|
||||
{
|
||||
const char *newex = mingw_rootify (executable1);
|
||||
*avhere = newex;
|
||||
- pid = _spawnv (_P_NOWAIT, newex, argv);
|
||||
+ pid = win32_spawn (newex, FALSE, argv,
|
||||
+ pid = win32_spawn (newex, FALSE, argv,
|
||||
+ dwCreationFlags, si, pi);
|
||||
if (executable1 != newex)
|
||||
free ((char *) newex);
|
||||
|
|
@ -518,7 +518,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
{
|
||||
*avhere = newex;
|
||||
- pid = _spawnv (_P_NOWAIT, newex, argv);
|
||||
+ pid = win32_spawn (newex, FALSE, argv,
|
||||
+ pid = win32_spawn (newex, FALSE, argv,
|
||||
+ dwCreationFlags, si, pi);
|
||||
free ((char *) newex);
|
||||
}
|
||||
|
|
@ -575,7 +575,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
+ stderr_handle = (HANDLE) _get_osfhandle (errdes);
|
||||
+ else
|
||||
+ stderr_handle = stdout_handle;
|
||||
|
||||
|
||||
- if (out != STDOUT_FILE_NO)
|
||||
- {
|
||||
- org_out = _dup (STDOUT_FILE_NO);
|
||||
|
|
@ -593,7 +593,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
- }
|
||||
- if (_close (out) < 0)
|
||||
+ /* Determine the version of Windows we are running on. */
|
||||
+ version_info.dwOSVersionInfoSize = sizeof (version_info);
|
||||
+ version_info.dwOSVersionInfoSize = sizeof (version_info);
|
||||
+ GetVersionEx (&version_info);
|
||||
+ if (version_info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
|
||||
+ /* On Windows 95/98/ME the CREATE_NO_WINDOW flag is not
|
||||
|
|
@ -607,7 +607,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
- }
|
||||
- }
|
||||
+ HANDLE conout_handle;
|
||||
|
||||
|
||||
- if (errdes != STDERR_FILE_NO
|
||||
- || (flags & PEX_STDERR_TO_STDOUT) != 0)
|
||||
- {
|
||||
|
|
@ -629,7 +629,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
- {
|
||||
- if (_close (errdes) < 0)
|
||||
+ /* Determine whether or not we have an associated console. */
|
||||
+ conout_handle = CreateFile("CONOUT$",
|
||||
+ conout_handle = CreateFile("CONOUT$",
|
||||
+ GENERIC_WRITE,
|
||||
+ FILE_SHARE_WRITE,
|
||||
+ /*lpSecurityAttributes=*/NULL,
|
||||
|
|
@ -641,9 +641,9 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
+ the child is a console process, the OS would normally
|
||||
+ create a new console Window for the child. Since we'll be
|
||||
+ redirecting the child's standard streams, we do not need
|
||||
+ the console window. */
|
||||
+ the console window. */
|
||||
+ dwCreationFlags = CREATE_NO_WINDOW;
|
||||
+ else
|
||||
+ else
|
||||
{
|
||||
- *err = errno;
|
||||
- *errmsg = "_close";
|
||||
|
|
@ -659,7 +659,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
+ dwCreationFlags = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- newargv = fix_argv (argv);
|
||||
- pid = (((flags & PEX_SEARCH) != 0 ? _spawnvp : _spawnv)
|
||||
- (_P_NOWAIT, executable, newargv));
|
||||
|
|
@ -677,7 +677,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
+ si.hStdOutput = stdout_handle;
|
||||
+ si.hStdError = stderr_handle;
|
||||
+
|
||||
+ /* Create the child process. */
|
||||
+ /* Create the child process. */
|
||||
+ pid = win32_spawn (executable, (flags & PEX_SEARCH) != 0,
|
||||
+ argv, dwCreationFlags, &si, &pi);
|
||||
if (pid == -1)
|
||||
|
|
@ -723,7 +723,7 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
+ *err = ENOENT;
|
||||
+ *errmsg = "CreateProcess";
|
||||
}
|
||||
|
||||
|
||||
- if (errdes != STDERR_FILE_NO
|
||||
- || (flags & PEX_STDERR_TO_STDOUT) != 0)
|
||||
- {
|
||||
|
|
@ -741,12 +741,12 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
- }
|
||||
- }
|
||||
+ /* Close the standard output and standard error handles in the
|
||||
+ parent. */
|
||||
+ parent. */
|
||||
+ if (out != STDOUT_FILENO)
|
||||
+ obj->funcs->close (obj, out);
|
||||
+ if (errdes != STDERR_FILENO)
|
||||
+ obj->funcs->close (obj, errdes);
|
||||
|
||||
|
||||
return pid;
|
||||
}
|
||||
@@ -656,30 +716,34 @@
|
||||
|
|
@ -756,10 +756,10 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
- int termstat;
|
||||
+ DWORD termstat;
|
||||
+ HANDLE h;
|
||||
|
||||
|
||||
if (time != NULL)
|
||||
memset (time, 0, sizeof *time);
|
||||
|
||||
|
||||
+ h = (HANDLE) pid;
|
||||
+
|
||||
/* FIXME: If done is non-zero, we should probably try to kill the
|
||||
|
|
@ -775,14 +775,14 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
+ *errmsg = "WaitForSingleObject";
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
- /* cwait returns the child process exit code in termstat. A value
|
||||
- of 3 indicates that the child caught a signal, but not which one.
|
||||
- Since only SIGABRT, SIGFPE and SIGINT do anything, we report
|
||||
- SIGABRT. */
|
||||
+ GetExitCodeProcess (h, &termstat);
|
||||
+ CloseHandle (h);
|
||||
|
||||
|
||||
+ /* A value of 3 indicates that the child caught a signal, but not
|
||||
+ which one. Since only SIGABRT, SIGFPE and SIGINT do anything, we
|
||||
+ report SIGABRT. */
|
||||
|
|
@ -791,6 +791,6 @@ diff -Nbaur gcc-4.1.1/libiberty/pex-win32.c gcc-4.1.1-arm/libiberty/pex-win32.c
|
|||
else
|
||||
- *status = ((termstat & 0xff) << 8);
|
||||
+ *status = (termstat & 0xff) << 8;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user