From 606525f98e6f90a00af4242de550e46106f0c838 Mon Sep 17 00:00:00 2001 From: acevest Date: Mon, 22 Dec 2025 14:55:09 +0800 Subject: [PATCH] =?utf8?q?=E6=8C=87=E5=AE=9A=E7=94=A8gnu11=E6=A0=87?= =?utf8?q?=E5=87=86=E7=BC=96=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 3fa3152..c38bbfd 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ OS := $(shell uname -s) 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- @@ -21,7 +21,7 @@ endif 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 -- 2.47.0