1 Star 0 Fork 124

刘家辉/third_party_bounds_checking_function

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
Makefile 991 Bytes
Copy Edit Raw Blame History
yu authored 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/JaysonLiu3/third_party_bounds_checking_function.git
git@gitee.com:JaysonLiu3/third_party_bounds_checking_function.git
JaysonLiu3
third_party_bounds_checking_function
third_party_bounds_checking_function
master

Search

D67c1975 1850385 1daf7b77 1850385