diff --git a/build-devkit.sh b/build-devkit.sh index 850c56e..39f047f 100644 --- a/build-devkit.sh +++ b/build-devkit.sh @@ -6,7 +6,7 @@ # devkitPSP release 13 #--------------------------------------------------------------------------------- -if [ 0 -eq 1 ] ; then +if [ 1 -eq 1 ] ; then echo "Currently in release cycle, proceed with caution, do not report problems, do not ask for support" exit 1 fi @@ -103,7 +103,7 @@ case "$VERSION" in toolchain=DEVKITARM ;; "2" ) - GCC_VER=4.2.4 + GCC_VER=4.4.0 BINUTILS_VER=2.19.1 NEWLIB_VER=1.17.0 GDB_VER=6.8 diff --git a/dkppc/patches/gcc-4.2.4.patch b/dkppc/patches/gcc-4.4.0.patch similarity index 53% rename from dkppc/patches/gcc-4.2.4.patch rename to dkppc/patches/gcc-4.4.0.patch index 996ab11..6ea90ab 100644 --- a/dkppc/patches/gcc-4.2.4.patch +++ b/dkppc/patches/gcc-4.4.0.patch @@ -1,18 +1,6 @@ -diff -Nbaur gcc-4.2.4/Makefile.in gcc-4.2.4-ppc/Makefile.in ---- gcc-4.2.4/Makefile.in 2006-12-29 17:47:06.000000000 +0000 -+++ gcc-4.2.4-ppc/Makefile.in 2009-04-30 01:26:57.000000000 +0100 -@@ -341,7 +341,7 @@ - # CFLAGS will be just -g. We want to ensure that TARGET libraries - # (which we know are built with gcc) are built with optimizations so - # prepend -O2 when setting CFLAGS_FOR_TARGET. --CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) -+CFLAGS_FOR_TARGET = -O2 $(SYSROOT_CFLAGS_FOR_TARGET) - SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ - CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(SYSROOT_CFLAGS_FOR_TARGET) - LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET) -diff -Nbaur gcc-4.2.4/config.sub gcc-4.2.4-ppc/config.sub ---- gcc-4.2.4/config.sub 2006-10-16 04:27:17.000000000 +0100 -+++ gcc-4.2.4-ppc/config.sub 2009-04-30 01:28:17.000000000 +0100 +diff -Nbaur gcc-4.4.0/config.sub gcc-4.4.0-ppc/config.sub +--- gcc-4.4.0/config.sub 2008-12-18 03:27:27.000000000 +0000 ++++ gcc-4.4.0-ppc/config.sub 2009-04-26 22:32:15.000000000 +0100 @@ -230,6 +230,10 @@ basic_machine=m68k-atari os=-mint @@ -24,39 +12,28 @@ diff -Nbaur gcc-4.2.4/config.sub gcc-4.2.4-ppc/config.sub esac # Decode aliases for certain CPU-COMPANY combinations. -diff -Nbaur gcc-4.2.4/gcc/c-incpath.c gcc-4.2.4-ppc/gcc/c-incpath.c ---- gcc-4.2.4/gcc/c-incpath.c 2007-09-01 16:28:30.000000000 +0100 -+++ gcc-4.2.4-ppc/gcc/c-incpath.c 2009-04-30 01:26:57.000000000 +0100 -@@ -340,13 +340,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 -- (unless it is a drive root dir, such "c:\"). Forward slashes, -- trailing or otherwise, cause no problems for stat(). */ -- char* c; -- for (c = path; *c; c++) -- if (*c == '\\') *c = '/'; -+ /* Remove unnecessary trailing slashes. On some versions of MS -+ Windows, trailing _forward_ slashes cause no problems for stat(). -+ On newer versions, stat() does not recognise a directory that ends -+ in a '\\' or '/', unless it is a drive root dir, such as "c:/", -+ where it is obligatory. */ -+ int pathlen = strlen (path); -+ 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; +diff -Nbaur gcc-4.4.0/gcc/config/rs6000/rs6000.h gcc-4.4.0-ppc/gcc/config/rs6000/rs6000.h +--- gcc-4.4.0/gcc/config/rs6000/rs6000.h 2009-04-10 00:23:07.000000000 +0100 ++++ gcc-4.4.0-ppc/gcc/config/rs6000/rs6000.h 2009-04-27 01:51:15.000000000 +0100 +@@ -180,12 +180,12 @@ + the condition in driver-rs6000.c. */ + #if defined(__powerpc__) || defined(__POWERPC__) || defined(_AIX) + /* In driver-rs6000.c. */ +-extern const char *host_detect_local_cpu (int argc, const char **argv); ++/*extern const char *host_detect_local_cpu (int argc, const char **argv); + #define EXTRA_SPEC_FUNCTIONS \ + { "local_cpu_detect", host_detect_local_cpu }, + #define HAVE_LOCAL_CPU_DETECT ++*/ #endif - - p = XNEW (cpp_dir); -diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/sysv4.h ---- gcc-4.2.4/gcc/config/rs6000/sysv4.h 2007-09-01 16:28:30.000000000 +0100 -+++ gcc-4.2.4-ppc/gcc/config/rs6000/sysv4.h 2009-04-30 01:26:57.000000000 +0100 -@@ -651,7 +651,11 @@ +- + #ifndef CC1_CPU_SPEC + #ifdef HAVE_LOCAL_CPU_DETECT + #define CC1_CPU_SPEC \ +diff -Nbaur gcc-4.4.0/gcc/config/rs6000/sysv4.h gcc-4.4.0-ppc/gcc/config/rs6000/sysv4.h +--- gcc-4.4.0/gcc/config/rs6000/sysv4.h 2009-04-10 00:23:07.000000000 +0100 ++++ gcc-4.4.0-ppc/gcc/config/rs6000/sysv4.h 2009-04-27 01:27:13.000000000 +0100 +@@ -664,7 +664,11 @@ /* Default starting address if specified. */ #define LINK_START_SPEC "\ @@ -69,7 +46,7 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ myellowknife : %(link_start_yellowknife) ; \ mmvme : %(link_start_mvme) ; \ msim : %(link_start_sim) ; \ -@@ -709,7 +713,8 @@ +@@ -721,7 +725,8 @@ /* Any specific OS flags. */ #define LINK_OS_SPEC "\ @@ -79,7 +56,7 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ myellowknife : %(link_os_yellowknife) ; \ mmvme : %(link_os_mvme) ; \ msim : %(link_os_sim) ; \ -@@ -726,7 +731,10 @@ +@@ -740,7 +745,10 @@ /* Override rs6000.h definition. */ #undef CPP_SPEC #define CPP_SPEC "%{posix: -D_POSIX_SOURCE} \ @@ -91,7 +68,7 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ myellowknife : %(cpp_os_yellowknife) ; \ mmvme : %(cpp_os_mvme) ; \ msim : %(cpp_os_sim) ; \ -@@ -743,7 +751,10 @@ +@@ -756,7 +764,10 @@ /* Override svr4.h definition. */ #undef STARTFILE_SPEC #define STARTFILE_SPEC "\ @@ -103,7 +80,7 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ myellowknife : %(startfile_yellowknife) ; \ mmvme : %(startfile_mvme) ; \ msim : %(startfile_sim) ; \ -@@ -760,7 +771,8 @@ +@@ -772,7 +783,8 @@ /* Override svr4.h definition. */ #undef LIB_SPEC #define LIB_SPEC "\ @@ -113,23 +90,23 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ myellowknife : %(lib_yellowknife) ; \ mmvme : %(lib_mvme) ; \ msim : %(lib_sim) ; \ -@@ -772,12 +784,13 @@ +@@ -783,12 +795,13 @@ mcall-openbsd: %(lib_openbsd) ; \ : %(lib_default) }" --#define LIB_DEFAULT_SPEC "" +-#define LIB_DEFAULT_SPEC "-lc" +#define LIB_DEFAULT_SPEC "--start-group -lsysbase -lc --end-group" /* Override svr4.h definition. */ #undef ENDFILE_SPEC #define ENDFILE_SPEC "\ --%{mads : crtsavres.o%s %(endfile_ads) ; \ -+%{mgcn|mogc|mvgc|mgcbios|mrvl : crtsavres.o%s %(endfile_ogc) ; \ -+ mads : crtsavres.o%s %(endfile_ads) ; \ - myellowknife : crtsavres.o%s %(endfile_yellowknife) ; \ - mmvme : crtsavres.o%s %(endfile_mvme) ; \ - msim : crtsavres.o%s %(endfile_sim) ; \ -@@ -795,16 +808,27 @@ +-%{mads : %(endfile_ads) ; \ ++%{mgcn|mogc|mvgc|mgcbios|mrvl : %(endfile_ogc) ; \ ++ mads : %(endfile_ads) ; \ + myellowknife : %(endfile_yellowknife) ; \ + mmvme : %(endfile_mvme) ; \ + msim : %(endfile_sim) ; \ +@@ -805,16 +818,27 @@ /* Motorola ADS support. */ #define LIB_ADS_SPEC "--start-group -lads -lc --end-group" @@ -157,7 +134,7 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ /* Motorola Yellowknife support. */ #define LIB_YELLOWKNIFE_SPEC "--start-group -lyk -lc --end-group" -@@ -1016,6 +1040,7 @@ +@@ -1007,6 +1031,7 @@ #undef SUBTARGET_EXTRA_SPECS #define SUBTARGET_EXTRA_SPECS \ { "crtsavres_default", CRTSAVRES_DEFAULT_SPEC }, \ @@ -165,23 +142,23 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ { "lib_ads", LIB_ADS_SPEC }, \ { "lib_yellowknife", LIB_YELLOWKNIFE_SPEC }, \ { "lib_mvme", LIB_MVME_SPEC }, \ -@@ -1027,6 +1052,7 @@ +@@ -1017,6 +1042,7 @@ + { "lib_netbsd", LIB_NETBSD_SPEC }, \ { "lib_openbsd", LIB_OPENBSD_SPEC }, \ - { "lib_windiss", LIB_WINDISS_SPEC }, \ { "lib_default", LIB_DEFAULT_SPEC }, \ + { "startfile_ogc", STARTFILE_OGC_SPEC }, \ { "startfile_ads", STARTFILE_ADS_SPEC }, \ { "startfile_yellowknife", STARTFILE_YELLOWKNIFE_SPEC }, \ { "startfile_mvme", STARTFILE_MVME_SPEC }, \ -@@ -1038,6 +1064,7 @@ +@@ -1027,6 +1053,7 @@ + { "startfile_netbsd", STARTFILE_NETBSD_SPEC }, \ { "startfile_openbsd", STARTFILE_OPENBSD_SPEC }, \ - { "startfile_windiss", STARTFILE_WINDISS_SPEC }, \ { "startfile_default", STARTFILE_DEFAULT_SPEC }, \ + { "endfile_ogc", ENDFILE_OGC_SPEC }, \ { "endfile_ads", ENDFILE_ADS_SPEC }, \ { "endfile_yellowknife", ENDFILE_YELLOWKNIFE_SPEC }, \ { "endfile_mvme", ENDFILE_MVME_SPEC }, \ -@@ -1053,7 +1080,11 @@ +@@ -1041,7 +1068,11 @@ { "link_shlib", LINK_SHLIB_SPEC }, \ { "link_target", LINK_TARGET_SPEC }, \ { "link_start", LINK_START_SPEC }, \ @@ -193,15 +170,15 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ { "link_start_yellowknife", LINK_START_YELLOWKNIFE_SPEC }, \ { "link_start_mvme", LINK_START_MVME_SPEC }, \ { "link_start_sim", LINK_START_SIM_SPEC }, \ -@@ -1065,6 +1096,7 @@ - { "link_start_windiss", LINK_START_WINDISS_SPEC }, \ +@@ -1052,6 +1083,7 @@ + { "link_start_openbsd", LINK_START_OPENBSD_SPEC }, \ { "link_start_default", LINK_START_DEFAULT_SPEC }, \ { "link_os", LINK_OS_SPEC }, \ + { "link_os_ogc", LINK_OS_OGC_SPEC }, \ { "link_os_ads", LINK_OS_ADS_SPEC }, \ { "link_os_yellowknife", LINK_OS_YELLOWKNIFE_SPEC }, \ { "link_os_mvme", LINK_OS_MVME_SPEC }, \ -@@ -1080,6 +1112,9 @@ +@@ -1066,6 +1098,9 @@ { "cc1_endian_little", CC1_ENDIAN_LITTLE_SPEC }, \ { "cc1_endian_default", CC1_ENDIAN_DEFAULT_SPEC }, \ { "cc1_secure_plt_default", CC1_SECURE_PLT_DEFAULT_SPEC }, \ @@ -211,9 +188,9 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.h gcc-4.2.4-ppc/gcc/config/rs6000/ { "cpp_os_ads", CPP_OS_ADS_SPEC }, \ { "cpp_os_yellowknife", CPP_OS_YELLOWKNIFE_SPEC }, \ { "cpp_os_mvme", CPP_OS_MVME_SPEC }, \ -diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.opt gcc-4.2.4-ppc/gcc/config/rs6000/sysv4.opt ---- gcc-4.2.4/gcc/config/rs6000/sysv4.opt 2007-09-01 16:28:30.000000000 +0100 -+++ gcc-4.2.4-ppc/gcc/config/rs6000/sysv4.opt 2009-04-30 01:26:57.000000000 +0100 +diff -Nbaur gcc-4.4.0/gcc/config/rs6000/sysv4.opt gcc-4.4.0-ppc/gcc/config/rs6000/sysv4.opt +--- gcc-4.4.0/gcc/config/rs6000/sysv4.opt 2009-02-20 15:20:38.000000000 +0000 ++++ gcc-4.4.0-ppc/gcc/config/rs6000/sysv4.opt 2009-04-26 22:32:15.000000000 +0100 @@ -107,6 +107,26 @@ Target RejectNegative Link with libads.a, libc.a and crt0.o @@ -241,43 +218,41 @@ diff -Nbaur gcc-4.2.4/gcc/config/rs6000/sysv4.opt gcc-4.2.4-ppc/gcc/config/rs600 myellowknife Target RejectNegative Link with libyk.a, libc.a and crt0.o -diff -Nbaur gcc-4.2.4/gcc/gcc.c gcc-4.2.4-ppc/gcc/gcc.c ---- gcc-4.2.4/gcc/gcc.c 2007-09-01 16:28:30.000000000 +0100 -+++ gcc-4.2.4-ppc/gcc/gcc.c 2009-04-30 01:26:57.000000000 +0100 -@@ -3369,8 +3369,6 @@ +diff -Nbaur gcc-4.4.0/gcc/gcc.c gcc-4.4.0-ppc/gcc/gcc.c +--- gcc-4.4.0/gcc/gcc.c 2009-03-17 21:25:59.000000000 +0000 ++++ gcc-4.4.0-ppc/gcc/gcc.c 2009-04-26 22:58:37.000000000 +0100 +@@ -3455,8 +3455,6 @@ gcc_libexec_prefix = make_relative_prefix (argv[0], standard_bindir_prefix, standard_libexec_prefix); - if (gcc_exec_prefix) -- putenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL)); +- xputenv (concat ("GCC_EXEC_PREFIX=", gcc_exec_prefix, NULL)); } else { -@@ -6213,10 +6211,21 @@ +@@ -6361,10 +6359,18 @@ /* 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) +- specs_file = (char *) alloca (strlen (standard_exec_prefix) ++ 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 = (char *) alloca (strlen (standard_exec_prefix) ++ + strlen (just_machine_suffix) + sizeof ("specs")); strcpy (specs_file, standard_exec_prefix); -+ + } -+ strcat (specs_file, just_machine_suffix); strcat (specs_file, "specs"); if (access (specs_file, R_OK) == 0) -diff -Nbaur gcc-4.2.4/gcc/prefix.c gcc-4.2.4-ppc/gcc/prefix.c ---- gcc-4.2.4/gcc/prefix.c 2007-09-01 16:28:30.000000000 +0100 -+++ gcc-4.2.4-ppc/gcc/prefix.c 2009-04-30 01:26:57.000000000 +0100 +diff -Nbaur gcc-4.4.0/gcc/prefix.c gcc-4.4.0-ppc/gcc/prefix.c +--- gcc-4.4.0/gcc/prefix.c 2007-09-03 18:09:20.000000000 +0100 ++++ gcc-4.4.0-ppc/gcc/prefix.c 2009-04-26 22:32:15.000000000 +0100 @@ -245,13 +245,16 @@ The returned string is always malloc-ed, and the caller is responsible for freeing it. */ @@ -304,38 +279,18 @@ diff -Nbaur gcc-4.2.4/gcc/prefix.c gcc-4.2.4-ppc/gcc/prefix.c + + putenv (concat ("GCC_EXEC_PREFIX=", std_prefix, NULL)); } -diff -Nbaur gcc-4.2.4/gcc/stor-layout.c gcc-4.2.4-ppc/gcc/stor-layout.c ---- gcc-4.2.4/gcc/stor-layout.c 2007-09-01 16:28:30.000000000 +0100 -+++ gcc-4.2.4-ppc/gcc/stor-layout.c 2009-04-30 01:26:58.000000000 +0100 -@@ -530,7 +530,15 @@ - #ifdef STRUCTURE_SIZE_BOUNDARY - /* Packed structures don't need to have minimum size. */ - if (! TYPE_PACKED (t)) -- rli->record_align = MAX (rli->record_align, (unsigned) STRUCTURE_SIZE_BOUNDARY); -+ { -+ unsigned tmp; -+ -+ /* #pragma pack overrides STRUCTURE_SIZE_BOUNDARY. */ -+ tmp = (unsigned) STRUCTURE_SIZE_BOUNDARY; -+ if (maximum_field_alignment != 0) -+ tmp = MIN (tmp, maximum_field_alignment); -+ rli->record_align = MAX (rli->record_align, tmp); -+ } - #endif - - rli->offset = size_zero_node; -diff -Nbaur gcc-4.2.4/gcc/toplev.c gcc-4.2.4-ppc/gcc/toplev.c ---- gcc-4.2.4/gcc/toplev.c 2007-09-01 16:28:30.000000000 +0100 -+++ gcc-4.2.4-ppc/gcc/toplev.c 2009-04-30 01:26:58.000000000 +0100 -@@ -81,6 +81,7 @@ - #include "value-prof.h" - #include "alloc-pool.h" +diff -Nbaur gcc-4.4.0/gcc/toplev.c gcc-4.4.0-ppc/gcc/toplev.c +--- gcc-4.4.0/gcc/toplev.c 2008-12-09 21:25:11.000000000 +0000 ++++ gcc-4.4.0-ppc/gcc/toplev.c 2009-04-27 02:05:20.000000000 +0100 +@@ -84,6 +84,7 @@ #include "tree-mudflap.h" + #include "tree-pass.h" + #include "gimple.h" +#include "prefix.h" #if defined (DWARF2_UNWIND_INFO) || defined (DWARF2_DEBUGGING_INFO) #include "dwarf2out.h" -@@ -1479,6 +1480,10 @@ +@@ -1553,6 +1554,10 @@ xmalloc_set_program_name (progname); @@ -346,62 +301,16 @@ diff -Nbaur gcc-4.2.4/gcc/toplev.c gcc-4.2.4-ppc/gcc/toplev.c hex_init (); /* Unlock the stdio streams. */ -diff -Nbaur gcc-4.2.4/gcc/version.c gcc-4.2.4-ppc/gcc/version.c ---- gcc-4.2.4/gcc/version.c 2005-03-16 06:04:10.000000000 +0000 -+++ gcc-4.2.4-ppc/gcc/version.c 2009-04-30 14:35:09.000000000 +0100 -@@ -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 " (devkitPPC release 17)" - - /* 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[] = ""; -+const char bug_report_url[] = ""; - - /* The complete version string, assembled from several pieces. - BASEVER, DATESTAMP, and DEVPHASE are defined by the Makefile. */ -diff -Nbaur gcc-4.2.4/libcpp/Makefile.in gcc-4.2.4-ppc/libcpp/Makefile.in ---- gcc-4.2.4/libcpp/Makefile.in 2008-05-19 15:28:07.000000000 +0100 -+++ gcc-4.2.4-ppc/libcpp/Makefile.in 2009-04-30 01:26:58.000000000 +0100 -@@ -196,7 +196,7 @@ - # Dependency rule. - COMPILE.base = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(ALL_CFLAGS) -c - ifeq ($(DEPMODE),depmode=gcc3) --COMPILE = $(COMPILE.base) -o $@ -MT $@ -MMD -MP -MF $(DEPDIR)/$*.Po +diff -Nbaur gcc-4.4.0/libcpp/Makefile.in gcc-4.4.0-ppc/libcpp/Makefile.in +--- gcc-4.4.0/libcpp/Makefile.in 2009-04-21 10:08:08.000000000 +0100 ++++ gcc-4.4.0-ppc/libcpp/Makefile.in 2009-04-27 01:21:10.000000000 +0100 +@@ -201,8 +201,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.2.4/libcpp/files.c gcc-4.2.4-ppc/libcpp/files.c ---- gcc-4.2.4/libcpp/files.c 2006-02-18 09:25:31.000000000 +0000 -+++ gcc-4.2.4-ppc/libcpp/files.c 2009-04-30 01:26:58.000000000 +0100 -@@ -226,6 +226,22 @@ - close (file->fd); - file->fd = -1; - } -+#if defined(_WIN32) && !defined(__CYGWIN__) -+ else if (errno == EACCES) -+ { -+ /* On most UNIX systems, open succeeds on a directory. Above, -+ we check if we have opened a directory and if so, set errno -+ to ENOENT. However, on Windows, opening a directory -+ fails with EACCESS. We want to return ENOENT in that -+ case too. */ -+ if (stat (file->path, &file->st) == 0 -+ && S_ISDIR (file->st.st_mode)) -+ errno = ENOENT; -+ else -+ /* The call to stat may have reset errno. */ -+ errno = EACCES; -+ } -+#endif - else if (errno == ENOTDIR) - errno = ENOENT; - diff --git a/dkppc/patches/newlib-1.17.0.patch b/dkppc/patches/newlib-1.17.0.patch index 3d69fa2..39cb0ba 100644 --- a/dkppc/patches/newlib-1.17.0.patch +++ b/dkppc/patches/newlib-1.17.0.patch @@ -5211,8 +5211,8 @@ diff -Nbaur newlib-1.17.0/libgloss/libsysbase/getpid.c newlib-1.17.0-ppc/libglos + diff -Nbaur newlib-1.17.0/libgloss/libsysbase/gettod.c newlib-1.17.0-ppc/libgloss/libsysbase/gettod.c --- newlib-1.17.0/libgloss/libsysbase/gettod.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-1.17.0-ppc/libgloss/libsysbase/gettod.c 2008-12-30 09:33:00.000000000 +0000 -@@ -0,0 +1,25 @@ ++++ newlib-1.17.0-ppc/libgloss/libsysbase/gettod.c 2009-05-14 20:59:10.000000000 +0100 +@@ -0,0 +1,39 @@ +/* + * Stub version of gettimeofday. + */ @@ -5222,22 +5222,36 @@ diff -Nbaur newlib-1.17.0/libgloss/libsysbase/gettod.c newlib-1.17.0-ppc/libglos +#include <_syslist.h> +#include +#include ++#include +#include -+#include "warning.h" -+ -+struct timeval; -+struct timezone; + ++#ifdef REENTRANT_SYSCALLS_PROVIDED ++//--------------------------------------------------------------------------------- ++int ++_DEFUN(_gettimeofday_r,(ptr,ptimeval,ptimezone), ++ struct _reent *ptr _AND ++ struct timeval *ptimeval _AND ++ void *ptimezone) ++{ ++//--------------------------------------------------------------------------------- ++#else ++//--------------------------------------------------------------------------------- +int +_DEFUN (_gettimeofday, (ptimeval, ptimezone), + struct timeval *ptimeval _AND + void *ptimezone) +{ -+ errno = ENOSYS; -+ return -1; ++//--------------------------------------------------------------------------------- ++ struct _reent *ptr = _REENT; ++#endif ++ ++ if ( __syscalls.gettod_r ) return __syscalls.gettod_r(ptr, ptimeval, ptimezone); ++ ++ ptr->_errno = ENOSYS; ++ return -1; ++ +} + -+stub_warning(_gettimeofday) diff -Nbaur newlib-1.17.0/libgloss/libsysbase/handle_manager.c newlib-1.17.0-ppc/libgloss/libsysbase/handle_manager.c --- newlib-1.17.0/libgloss/libsysbase/handle_manager.c 1970-01-01 01:00:00.000000000 +0100 +++ newlib-1.17.0-ppc/libgloss/libsysbase/handle_manager.c 2008-12-30 09:33:00.000000000 +0000 @@ -5861,7 +5875,7 @@ diff -Nbaur newlib-1.17.0/libgloss/libsysbase/statvfs.c newlib-1.17.0-ppc/libglo +} diff -Nbaur newlib-1.17.0/libgloss/libsysbase/syscall_support.c newlib-1.17.0-ppc/libgloss/libsysbase/syscall_support.c --- newlib-1.17.0/libgloss/libsysbase/syscall_support.c 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-1.17.0-ppc/libgloss/libsysbase/syscall_support.c 2008-12-30 09:33:00.000000000 +0000 ++++ newlib-1.17.0-ppc/libgloss/libsysbase/syscall_support.c 2009-05-14 18:26:39.000000000 +0100 @@ -0,0 +1,66 @@ +#include + @@ -5876,7 +5890,7 @@ diff -Nbaur newlib-1.17.0/libgloss/libsysbase/syscall_support.c newlib-1.17.0-pp + NULL, // malloc_lock + NULL, // malloc_unlock + NULL, // exit -+ NULL // times_r ++ NULL // gettod_r +}; + +int __libc_lock_init(int *lock,int recursive) { @@ -6234,7 +6248,7 @@ diff -Nbaur newlib-1.17.0/libgloss/rs6000/crtmain.c newlib-1.17.0-ppc/libgloss/r + exit ( main(__system_argv->argc,__system_argv->argv) ); +} diff -Nbaur newlib-1.17.0/newlib/configure.host newlib-1.17.0-ppc/newlib/configure.host ---- newlib-1.17.0/newlib/configure.host 2009-04-27 01:37:58.000000000 +0100 +--- newlib-1.17.0/newlib/configure.host 2008-12-17 23:09:09.000000000 +0000 +++ newlib-1.17.0-ppc/newlib/configure.host 2009-04-27 01:38:25.000000000 +0100 @@ -683,6 +683,11 @@ default_newlib_io_long_long="yes" @@ -6354,8 +6368,8 @@ diff -Nbaur newlib-1.17.0/newlib/libc/include/sys/dirent.h newlib-1.17.0-ppc/new \ No newline at end of file diff -Nbaur newlib-1.17.0/newlib/libc/include/sys/iosupport.h newlib-1.17.0-ppc/newlib/libc/include/sys/iosupport.h --- newlib-1.17.0/newlib/libc/include/sys/iosupport.h 1970-01-01 01:00:00.000000000 +0100 -+++ newlib-1.17.0-ppc/newlib/libc/include/sys/iosupport.h 2008-12-30 09:33:00.000000000 +0000 -@@ -0,0 +1,83 @@ ++++ newlib-1.17.0-ppc/newlib/libc/include/sys/iosupport.h 2009-05-14 18:25:57.000000000 +0100 +@@ -0,0 +1,85 @@ +//--------------------------------------------------------------------------------- +#ifndef __iosupp_h__ +#define __iosupp_h__ @@ -6368,6 +6382,7 @@ diff -Nbaur newlib-1.17.0/newlib/libc/include/sys/iosupport.h newlib-1.17.0-ppc/ +#include +#include +#include ++#include + +enum { + STD_IN, @@ -6422,6 +6437,7 @@ diff -Nbaur newlib-1.17.0/newlib/libc/include/sys/iosupport.h newlib-1.17.0-ppc/ + void (*malloc_lock) (struct _reent *ptr); + void (*malloc_unlock) (struct _reent *ptr); + void (*exit) ( int rc ); ++ int (*gettod_r) (struct _reent *ptr, struct timeval *tp, struct timezone *tz); +} __syscalls_t; + +extern __syscalls_t __syscalls; @@ -6439,6 +6455,18 @@ diff -Nbaur newlib-1.17.0/newlib/libc/include/sys/iosupport.h newlib-1.17.0-ppc/ +//--------------------------------------------------------------------------------- +#endif // __iosupp_h__ +//--------------------------------------------------------------------------------- +diff -Nbaur newlib-1.17.0/newlib/libc/include/sys/reent.h newlib-1.17.0-ppc/newlib/libc/include/sys/reent.h +--- newlib-1.17.0/newlib/libc/include/sys/reent.h 2008-12-10 23:43:12.000000000 +0000 ++++ newlib-1.17.0-ppc/newlib/libc/include/sys/reent.h 2009-05-11 18:47:12.000000000 +0100 +@@ -203,7 +203,7 @@ + + /* Unix stdio files get aligned to block boundaries on fseek() */ + int _blksize; /* stat.st_blksize (may be != _bf._size) */ +- int _offset; /* current lseek offset */ ++ _fpos_t _offset; /* current lseek offset */ + + #ifndef _REENT_SMALL + struct _reent *_data; /* Here for binary compatibility? Remove? */ diff -Nbaur newlib-1.17.0/newlib/libc/include/sys/statvfs.h newlib-1.17.0-ppc/newlib/libc/include/sys/statvfs.h --- newlib-1.17.0/newlib/libc/include/sys/statvfs.h 1970-01-01 01:00:00.000000000 +0100 +++ newlib-1.17.0-ppc/newlib/libc/include/sys/statvfs.h 2008-12-30 09:33:00.000000000 +0000 @@ -6767,6 +6795,19 @@ diff -Nbaur newlib-1.17.0/newlib/libc/stdio/findfp.c newlib-1.17.0-ppc/newlib/li __sinit_lock_release (); } +diff -Nbaur newlib-1.17.0/newlib/libc/stdio/fopen.c newlib-1.17.0-ppc/newlib/libc/stdio/fopen.c +--- newlib-1.17.0/newlib/libc/stdio/fopen.c 2004-06-11 21:37:10.000000000 +0100 ++++ newlib-1.17.0-ppc/newlib/libc/stdio/fopen.c 2009-05-14 15:24:25.000000000 +0100 +@@ -151,6 +151,9 @@ + + _flockfile (fp); + ++ flags &= ~(__SLBF | __SNBF | __SMBF); ++ flags |= __SNBF; ++ + fp->_file = f; + fp->_flags = flags; + fp->_cookie = (_PTR) fp; diff -Nbaur newlib-1.17.0/newlib/libc/stdio/fread.c newlib-1.17.0-ppc/newlib/libc/stdio/fread.c --- newlib-1.17.0/newlib/libc/stdio/fread.c 2008-12-11 17:27:56.000000000 +0000 +++ newlib-1.17.0-ppc/newlib/libc/stdio/fread.c 2009-01-15 21:23:53.000000000 +0000 diff --git a/dkppc/scripts/build-gcc.sh b/dkppc/scripts/build-gcc.sh index 7ff7c4f..93c5220 100644 --- a/dkppc/scripts/build-gcc.sh +++ b/dkppc/scripts/build-gcc.sh @@ -101,7 +101,7 @@ then --with-newlib \ --prefix=$prefix\ --disable-dependency-tracking \ - --with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPPC release 17" \ + --with-bugurl="http://wiki.devkitpro.org/index.php/Bug_Reports" --with-pkgversion="devkitPPC release 18 alpha" \ 2>&1 | tee gcc_configure.log touch configured-gcc fi