mirror of
https://github.com/devkitPro/buildscripts.git
synced 2026-08-21 09:54:03 -05:00
Compare commits
6 Commits
devkitPPC_
...
v20180716
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e0aebb7afb | ||
|
|
eed906eda5 | ||
|
|
893eeef9c5 | ||
|
|
9f518e2f8d | ||
|
|
df5a8f947a | ||
|
|
0778d4209c |
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#---------------------------------------------------------------------------------
|
||||
# devkitARM release 49
|
||||
# devkitPPC release 31
|
||||
# devkitA64 release 10
|
||||
# devkitPPC release 32
|
||||
# devkitA64 release 11
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
if [ 0 -eq 1 ] ; then
|
||||
@@ -57,8 +57,8 @@ TEX3DS_VER=1.0.0
|
||||
GP32_TOOLS_VER=1.0.3
|
||||
LIBMIRKO_VER=0.9.8
|
||||
|
||||
SWITCH_TOOLS_VER=1.4.0
|
||||
LIBNX_VER=1.2.1
|
||||
SWITCH_TOOLS_VER=1.4.1
|
||||
LIBNX_VER=1.3.0
|
||||
|
||||
OSXMIN=${OSXMIN:-10.9}
|
||||
|
||||
|
||||
@@ -609,10 +609,10 @@ index 000000000..b6cdfaeb8
|
||||
+m4_include([../acinclude.m4])
|
||||
diff --git a/libgloss/libsysbase/chdir.c b/libgloss/libsysbase/chdir.c
|
||||
new file mode 100644
|
||||
index 000000000..90d2dc5b7
|
||||
index 000000000..b94f6a8b4
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/chdir.c
|
||||
@@ -0,0 +1,201 @@
|
||||
@@ -0,0 +1,200 @@
|
||||
+#include <unistd.h>
|
||||
+#include <limits.h>
|
||||
+#include <reent.h>
|
||||
@@ -712,11 +712,10 @@ index 000000000..90d2dc5b7
|
||||
+ extra += extraSize;
|
||||
+ } while (extraSize != 0);
|
||||
+
|
||||
+ if (pathEnd[-1] != DIRECTORY_SEPARATOR_CHAR) {
|
||||
+ pathEnd[0] = DIRECTORY_SEPARATOR_CHAR;
|
||||
+ pathEnd[1] = 0;
|
||||
+ pathEnd += 1;
|
||||
+ }
|
||||
+ if (strlen(path) > 2 ) {
|
||||
+ if (pathEnd[-1] == DIRECTORY_SEPARATOR_CHAR && pathEnd[-2] != ':')
|
||||
+ pathEnd[-1] = '\0';
|
||||
+ }
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
@@ -5349,10 +5348,10 @@ index 000000000..da85a3f46
|
||||
+
|
||||
diff --git a/libgloss/libsysbase/dirent.c b/libgloss/libsysbase/dirent.c
|
||||
new file mode 100644
|
||||
index 000000000..0ad29029c
|
||||
index 000000000..7d1f4545d
|
||||
--- /dev/null
|
||||
+++ b/libgloss/libsysbase/dirent.c
|
||||
@@ -0,0 +1,255 @@
|
||||
@@ -0,0 +1,256 @@
|
||||
+#include <malloc.h>
|
||||
+#include <errno.h>
|
||||
+#include <string.h>
|
||||
@@ -5562,6 +5561,7 @@ index 000000000..0ad29029c
|
||||
+
|
||||
+ strncpy (entry->d_name, filename, sizeof(entry->d_name));
|
||||
+ entry->d_ino = st.st_ino;
|
||||
+ entry->d_type = S_ISDIR(st.st_mode)?DT_DIR:DT_REG;
|
||||
+
|
||||
+ *result = entry;
|
||||
+ return 0;
|
||||
@@ -7416,10 +7416,10 @@ index 2082dfdb1..e535f189b 100644
|
||||
#define MALLOC_ALIGNMENT 16
|
||||
#endif
|
||||
diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h
|
||||
index a3fb5c02c..5debd1525 100644
|
||||
index a3fb5c02c..79df5cf61 100644
|
||||
--- a/newlib/libc/include/sys/dirent.h
|
||||
+++ b/newlib/libc/include/sys/dirent.h
|
||||
@@ -1,13 +1,58 @@
|
||||
@@ -1,13 +1,65 @@
|
||||
/* <dirent.h> includes <sys/dirent.h>, which is this file. On a
|
||||
system which supports <dirent.h>, this file is overridden by
|
||||
dirent.h in the libc/sys/.../sys directory. On a system which does
|
||||
@@ -7431,7 +7431,6 @@ index a3fb5c02c..5debd1525 100644
|
||||
+#ifndef _dirent_h_
|
||||
+#define _dirent_h_
|
||||
+
|
||||
+#include <sys/iosupport.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/syslimits.h>
|
||||
+
|
||||
@@ -7444,37 +7443,45 @@ index a3fb5c02c..5debd1525 100644
|
||||
+#define DT_LNK 10
|
||||
+#define DT_SOCK 12
|
||||
+#define DT_WHT 14
|
||||
+
|
||||
+#define _DIRENT_HAVE_D_TYPE
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
-#error "<dirent.h> not supported"
|
||||
+
|
||||
+ struct dirent {
|
||||
+ ino_t d_ino;
|
||||
+ unsigned char d_type;
|
||||
+ char d_name[NAME_MAX+1];
|
||||
+ };
|
||||
+struct dirent {
|
||||
+ ino_t d_ino;
|
||||
+ unsigned char d_type;
|
||||
+ char d_name[NAME_MAX+1];
|
||||
+};
|
||||
+
|
||||
+ typedef struct {
|
||||
+ long int position;
|
||||
+ DIR_ITER* dirData;
|
||||
+ struct dirent fileData;
|
||||
+ } DIR;
|
||||
+/* Directory iterator for mantaining state between dir* calls */
|
||||
+typedef struct {
|
||||
+ int device;
|
||||
+ void *dirStruct;
|
||||
+} DIR_ITER;
|
||||
+
|
||||
+ int closedir(DIR *dirp);
|
||||
+ DIR *opendir(const char *dirname);
|
||||
+ struct dirent *readdir(DIR *dirp);
|
||||
+ int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
|
||||
+ void rewinddir(DIR *dirp);
|
||||
+ void seekdir(DIR *dirp, long int loc);
|
||||
+ long int telldir(DIR *dirp);
|
||||
+typedef struct {
|
||||
+ long int position;
|
||||
+ DIR_ITER* dirData;
|
||||
+ struct dirent fileData;
|
||||
+} DIR;
|
||||
+
|
||||
+ int scandir(const char *dirp, struct dirent ***namelist,
|
||||
+ int (*filter)(const struct dirent *),
|
||||
+ int (*compar)(const struct dirent **, const struct dirent **));
|
||||
+int closedir(DIR *dirp);
|
||||
+DIR *opendir(const char *dirname);
|
||||
+struct dirent *readdir(DIR *dirp);
|
||||
+int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
|
||||
+void rewinddir(DIR *dirp);
|
||||
+void seekdir(DIR *dirp, long int loc);
|
||||
+long int telldir(DIR *dirp);
|
||||
+
|
||||
+ int alphasort(const struct dirent **a, const struct dirent **b);
|
||||
+int scandir(const char *dirp, struct dirent ***namelist,
|
||||
+ int (*filter)(const struct dirent *),
|
||||
+ int (*compar)(const struct dirent **, const struct dirent **));
|
||||
+
|
||||
+int alphasort(const struct dirent **a, const struct dirent **b);
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
@@ -7497,10 +7504,10 @@ index 2900b332f..6efb54eb3 100644
|
||||
#ifdef __rtems__
|
||||
diff --git a/newlib/libc/include/sys/iosupport.h b/newlib/libc/include/sys/iosupport.h
|
||||
new file mode 100644
|
||||
index 000000000..ee14d2610
|
||||
index 000000000..e177ccf8e
|
||||
--- /dev/null
|
||||
+++ b/newlib/libc/include/sys/iosupport.h
|
||||
@@ -0,0 +1,112 @@
|
||||
@@ -0,0 +1,106 @@
|
||||
+//---------------------------------------------------------------------------------
|
||||
+#ifndef __iosupp_h__
|
||||
+#define __iosupp_h__
|
||||
@@ -7514,6 +7521,7 @@ index 000000000..ee14d2610
|
||||
+#include <sys/stat.h>
|
||||
+#include <sys/statvfs.h>
|
||||
+#include <time.h>
|
||||
+#include <dirent.h>
|
||||
+
|
||||
+enum {
|
||||
+ STD_IN,
|
||||
@@ -7522,19 +7530,12 @@ index 000000000..ee14d2610
|
||||
+ STD_MAX = 16
|
||||
+};
|
||||
+
|
||||
+
|
||||
+typedef struct {
|
||||
+ unsigned int device;
|
||||
+ unsigned int refcount;
|
||||
+ void *fileStruct;
|
||||
+} __handle;
|
||||
+
|
||||
+/* Directory iterator for mantaining state between dir* calls */
|
||||
+typedef struct {
|
||||
+ int device;
|
||||
+ void *dirStruct;
|
||||
+} DIR_ITER;
|
||||
+
|
||||
+typedef struct {
|
||||
+ const char *name;
|
||||
+ size_t structSize;
|
||||
|
||||
@@ -64,7 +64,7 @@ then
|
||||
--prefix=$prefix \
|
||||
--enable-lto $plugin_ld\
|
||||
--with-system-zlib \
|
||||
--with-bugurl="https://github.com/devkitPro/buildscripts/issues" --with-pkgversion="devkitA64 release 10" \
|
||||
--with-bugurl="https://github.com/devkitPro/buildscripts/issues" --with-pkgversion="devkitA64 release 11" \
|
||||
$CROSS_PARAMS \
|
||||
$CROSS_GCC_PARAMS \
|
||||
|| { echo "Error configuring gcc"; exit 1; }
|
||||
|
||||
@@ -7407,17 +7407,16 @@ index eb645868b..b9a006453 100644
|
||||
powerpc*-*-linux* | \
|
||||
powerpc*-*-rtem* | \
|
||||
diff --git a/newlib/libc/include/sys/dirent.h b/newlib/libc/include/sys/dirent.h
|
||||
index a3fb5c02c..8ddd10867 100644
|
||||
index a3fb5c02c..b42f0b3b1 100644
|
||||
--- a/newlib/libc/include/sys/dirent.h
|
||||
+++ b/newlib/libc/include/sys/dirent.h
|
||||
@@ -4,10 +4,57 @@
|
||||
@@ -4,10 +4,56 @@
|
||||
not support <dirent.h>, we will get this file which uses #error to force
|
||||
an error. */
|
||||
|
||||
+#ifndef _dirent_h_
|
||||
+#define _dirent_h_
|
||||
+
|
||||
+#include <sys/iosupport.h>
|
||||
+#include <sys/types.h>
|
||||
+#include <sys/syslimits.h>
|
||||
+
|
||||
@@ -7446,7 +7445,7 @@ index a3fb5c02c..8ddd10867 100644
|
||||
+
|
||||
+ typedef struct {
|
||||
+ long int position;
|
||||
+ DIR_ITER* dirData;
|
||||
+ void* dirData;
|
||||
+ struct dirent fileData;
|
||||
+ } DIR;
|
||||
+
|
||||
|
||||
@@ -97,7 +97,7 @@ then
|
||||
--with-headers=../../newlib-$NEWLIB_VER/newlib/libc/include \
|
||||
--prefix=$prefix\
|
||||
--with-system-zlib\
|
||||
--with-bugurl="https://github.com/devkitpro/buildscripts/issues" --with-pkgversion="devkitPPC release 31" \
|
||||
--with-bugurl="https://github.com/devkitpro/buildscripts/issues" --with-pkgversion="devkitPPC release 32" \
|
||||
$CROSS_PARAMS \
|
||||
$CROSS_GCC_PARAMS \
|
||||
CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections" \
|
||||
@@ -139,7 +139,6 @@ then
|
||||
--target=$target \
|
||||
--prefix=$prefix \
|
||||
--enable-newlib-mb \
|
||||
--enable-newlib-hw-fp \
|
||||
|| { echo "Error configuring newlib"; exit 1; }
|
||||
touch configured-newlib
|
||||
fi
|
||||
@@ -203,7 +202,8 @@ if [ ! -f configured-gdb ]
|
||||
then
|
||||
CFLAGS="$cflags" LDFLAGS="$ldflags" ../../gdb-$GDB_VER/configure \
|
||||
--disable-nls --prefix=$prefix --target=$target --disable-werror \
|
||||
$CROSS_PARAMS || { echo "Error configuring gdb"; exit 1; }
|
||||
$CROSS_PARAMS \
|
||||
$CROSS_GCC_PARAMS || { echo "Error configuring gdb"; exit 1; }
|
||||
touch configured-gdb
|
||||
fi
|
||||
|
||||
|
||||
@@ -27,5 +27,5 @@ fi
|
||||
#---------------------------------------------------------------------------------
|
||||
TOOLPATH=$(echo $INSTALLDIR | sed -e 's/^\([a-zA-Z]\):/\/\1/')
|
||||
export PATH=$PATH:$TOOLPATH/$package/bin
|
||||
|
||||
export prefix=$INSTALLDIR/$CROSSBUILD/$package
|
||||
. ./strip_bins.sh
|
||||
|
||||
Reference in New Issue
Block a user