# --- T2-COPYRIGHT-NOTE-BEGIN --- # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # T2 SDE: package/.../dietlibc/mips64.patch # Copyright (C) 2010 - 2018 The T2 SDE Project # # More information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any later # version. # --- T2-COPYRIGHT-NOTE-END --- MIPS64 support for dietlibc, most stuff works now. The patch depends on: cp -ar mips{,64} as base. - Rene Rebe --- dietlibc-0.32/syscalls.h.vanilla 2011-01-11 15:55:47.687079252 +0000 +++ dietlibc-0.32/syscalls.h 2011-01-11 15:57:14.183804303 +0000 @@ -17,6 +17,9 @@ #elif defined(__powerpc__) #include "ppc/syscalls.h" +#elif defined(__mips64) +#include "mips64/syscalls.h" + #elif defined(__mips__) #include "mips/syscalls.h" --- dietlibc-0.33/diet.c.vanilla 2014-06-03 16:47:32.000000000 +0200 +++ dietlibc-0.33/diet.c 2014-06-03 16:47:54.000000000 +0200 @@ -34,6 +34,7 @@ "alpha","-Os","-fomit-frame-pointer",0, "arm","-Os","-fomit-frame-pointer",0, "mips","-Os","-fomit-frame-pointer","-march=mips2",0, + "mips64","-Os","-fomit-frame-pointer","-mno-abicalls","-fno-pic","-G","0",0, "mipsel","-Os","-fomit-frame-pointer","-march=mips2",0, "ppc","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, "ppc64","-Os","-fomit-frame-pointer","-mpowerpc-gpopt","-mpowerpc-gfxopt",0, @@ -173,6 +174,9 @@ #ifdef __mips__ shortplatform="mips"; #endif +#ifdef __mips64 + shortplatform="mips64"; +#endif #ifdef __s390x__ shortplatform="s390x"; #else --- dietlibc-0.34/mips/syscalls.h.vanilla 2018-10-23 12:45:00.729379888 +0000 +++ dietlibc-0.34/mips/syscalls.h 2018-10-23 12:46:00.513378989 +0000 @@ -371,7 +371,7 @@ #define __NR_pkey_alloc (__NR_Linux + 364) #define __NR_pkey_free (__NR_Linux + 365) -#elif _MIPS_SIM == _ABI64 +#elif 1 /* _MIPS_SIM == _ABI64 */ /* * Linux 64-bit syscalls are in the range from 5000 to 5999.