mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-12 14:09:12 +00:00
Introduce native support for MacOS ARM64
There's a new program named ape/ape-m1.c which will be used to build an embeddable binary that can load ape and elf executables. The support is mostly working so far, but still chasing down ABI issues.
This commit is contained in:
parent
b852650c08
commit
1422e96b4e
757 changed files with 2988 additions and 1321 deletions
1
third_party/ggml/quantize.cc
vendored
1
third_party/ggml/quantize.cc
vendored
|
@ -41,6 +41,7 @@ asm(".include \"libc/disclaimer.inc\"");
|
|||
// clang-format off
|
||||
|
||||
static const std::map<std::string, llama_ftype> LLAMA_FTYPE_MAP = {
|
||||
{"f32", LLAMA_FTYPE_ALL_F32 },
|
||||
{"f16", LLAMA_FTYPE_MOSTLY_F16 },
|
||||
{"q4_0", LLAMA_FTYPE_MOSTLY_Q4_0},
|
||||
{"q4_1", LLAMA_FTYPE_MOSTLY_Q4_1},
|
||||
|
|
2
third_party/mbedtls/test/lib.c
vendored
2
third_party/mbedtls/test/lib.c
vendored
|
@ -14,6 +14,7 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
#include "third_party/mbedtls/test/lib.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/dce.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
|
@ -42,7 +43,6 @@
|
|||
#include "third_party/mbedtls/endian.h"
|
||||
#include "third_party/mbedtls/error.h"
|
||||
#include "third_party/mbedtls/platform.h"
|
||||
#include "third_party/mbedtls/test/lib.h"
|
||||
|
||||
asm(".ident\t\"\\n\\n\
|
||||
Mbed TLS (Apache 2.0)\\n\
|
||||
|
|
4
third_party/musl/crypt_des.c
vendored
4
third_party/musl/crypt_des.c
vendored
|
@ -25,9 +25,9 @@
|
|||
│ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. │
|
||||
│ │
|
||||
╚─────────────────────────────────────────────────────────────────────────────*/
|
||||
#include "libc/mem/alg.h"
|
||||
#include "libc/limits.h"
|
||||
#include "libc/literal.h"
|
||||
#include "libc/mem/alg.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "third_party/musl/crypt.internal.h"
|
||||
#include "third_party/musl/crypt_des.internal.h"
|
||||
|
@ -813,7 +813,7 @@ void __do_des(uint32_t l_in, uint32_t r_in,
|
|||
unsigned int round = 16;
|
||||
const uint32_t *kl = ekey->l;
|
||||
const uint32_t *kr = ekey->r;
|
||||
uint32_t f;
|
||||
uint32_t f = 0;
|
||||
while (round--) {
|
||||
uint32_t r48l, r48r;
|
||||
/*
|
||||
|
|
6
third_party/python/Modules/faulthandler.c
vendored
6
third_party/python/Modules/faulthandler.c
vendored
|
@ -102,7 +102,7 @@ static struct {
|
|||
PY_TIMEOUT_T timeout_us; /* timeout in microseconds */
|
||||
int repeat;
|
||||
PyInterpreterState *interp;
|
||||
int exit;
|
||||
int exit_;
|
||||
char *header;
|
||||
size_t header_len;
|
||||
/* The main thread always holds this lock. It is only released when
|
||||
|
@ -622,7 +622,7 @@ faulthandler_thread(void *unused)
|
|||
errmsg = _Py_DumpTracebackThreads(thread.fd, thread.interp, NULL);
|
||||
ok = (errmsg == NULL);
|
||||
|
||||
if (thread.exit)
|
||||
if (thread.exit_)
|
||||
_exit(1);
|
||||
} while (ok && thread.repeat);
|
||||
|
||||
|
@ -729,7 +729,7 @@ faulthandler_dump_traceback_later(PyObject *self,
|
|||
thread.timeout_us = timeout_us;
|
||||
thread.repeat = repeat;
|
||||
thread.interp = tstate->interp;
|
||||
thread.exit = exit;
|
||||
thread.exit_ = exit;
|
||||
thread.header = header;
|
||||
thread.header_len = header_len;
|
||||
|
||||
|
|
4
third_party/zip/zipnote.c
vendored
4
third_party/zip/zipnote.c
vendored
|
@ -72,10 +72,6 @@ void zipnoteerr(int c, ZCONST char *h);
|
|||
void zipnotewarn(ZCONST char *a, ZCONST char *b);
|
||||
#endif
|
||||
|
||||
#ifdef QDOS
|
||||
#define exit(p1) QDOSexit()
|
||||
#endif
|
||||
|
||||
int set_filetype(out_path)
|
||||
char *out_path;
|
||||
{
|
||||
|
|
1
third_party/zip/zipsplit.c
vendored
1
third_party/zip/zipsplit.c
vendored
|
@ -45,7 +45,6 @@
|
|||
# define INDEX "zipsplit_idx" /* Name of index file */
|
||||
# define TEMPL_FMT "%%0%dld_zip"
|
||||
# define TEMPL_SIZ 17
|
||||
# define exit(p1) QDOSexit()
|
||||
#else
|
||||
#ifdef VM_CMS
|
||||
# define INDEX "zipsplit.idx" /* Name of index file */
|
||||
|
|
2
third_party/zlib/cpu_features.c
vendored
2
third_party/zlib/cpu_features.c
vendored
|
@ -19,7 +19,7 @@
|
|||
#include "libc/dce.h"
|
||||
#include "libc/runtime/runtime.h"
|
||||
#include "libc/sysv/consts/auxv.h"
|
||||
#include "libc/sysv/consts/hwap.h"
|
||||
#include "libc/sysv/consts/hwcap.h"
|
||||
#include "third_party/zlib/cpu_features.internal.h"
|
||||
#include "third_party/zlib/zlib.h"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue