1 Star 0 Fork 126

OpenEuler-Graphics/third_party_bounds_checking_function

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 991 Bytes
一键复制 编辑 原始数据 按行查看 历史
yu 提交于 2023-03-09 03:36 . 开源软件升级
PROJECT=libboundscheck.so
CC?=gcc
OPTION = -fPIC
OPTION += -fstack-protector-all
OPTION += -D_FORTIFY_SOURCE=2 -O2
OPTION += -Wformat=2 -Wfloat-equal -Wshadow
OPTION += -Wconversion
OPTION += -Wformat-security
OPTION += -Wextra
OPTION += --param ssp-buffer-size=4
OPTION += -Warray-bounds
OPTION += -Wpointer-arith
OPTION += -Wcast-qual
OPTION += -Wstrict-prototypes
OPTION += -Wmissing-prototypes
OPTION += -Wstrict-overflow=1
OPTION += -Wstrict-aliasing=2
OPTION += -Wswitch -Wswitch-default
CFLAG = -Wall -DNDEBUG -O2 $(OPTION)
SOURCES=$(wildcard src/*.c)
OBJECTS=$(patsubst %.c,%.o,$(SOURCES))
.PHONY:clean
CFLAG += -Iinclude
LD_FLAG = -fPIC -s -Wl,-z,relro,-z,now,-z,noexecstack -fstack-protector-all
$(PROJECT): $(OBJECTS)
mkdir -p lib
$(CC) -shared -o lib/$@ $(patsubst %.o,obj/%.o,$(notdir $(OBJECTS))) $(LD_FLAG)
@echo "finish $(PROJECT)"
.c.o:
@mkdir -p obj
$(CC) -c $< $(CFLAG) -o obj/$(patsubst %.c,%.o,$(notdir $<))
clean:
-rm -rf obj lib
@echo "clean up"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openeuler-graphics-frontier/third_party_bounds_checking_function.git
git@gitee.com:openeuler-graphics-frontier/third_party_bounds_checking_function.git
openeuler-graphics-frontier
third_party_bounds_checking_function
third_party_bounds_checking_function
master

搜索帮助