Repos / kernel.git / commitdiff
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c98672)
raw | patch | inline | side by side (parent: 6c98672)
| author | zhaoyanbai <zhaoyanbai@126.com> | |
| Mon, 22 Dec 2025 06:55:09 +0000 (14:55 +0800) | ||
| committer | zhaoyanbai <zhaoyanbai@126.com> | |
| Mon, 22 Dec 2025 06:55:09 +0000 (14:55 +0800) |
| Makefile | patch | blob | history |
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
CPU_ARCH := $(shell uname -p)
ifeq ($(OS), Darwin)
- # MacOS下安装i686-elf-*的方法: brew install i686-elf-binutils
+ # MacOS下安装i686-elf-*的方法: brew install i686-elf-binutils i686-elf-gcc
# Apple Silicon
ifeq ($(CPU_ARCH), arm)
CROSS_PREFIX = i686-elf-
CC = $(CROSS_PREFIX)gcc
LD = $(CROSS_PREFIX)ld
-CFLAGS = -g -c -fno-builtin -m32 -DBUILDER='"$(shell whoami)"'
+CFLAGS = -g -c -fno-builtin -m32 -DBUILDER='"$(shell whoami)"' -std=gnu11
# 指示编译器禁止生成位置无关代码
CFLAGS += -fno-pic
# 指示编译器在生成目标文件时不省略函数调用栈帧指针: frame pointer