Skip to content

Commit 6bc562a

Browse files
committed
split gcc specific option for buf-overflow.c
1 parent 573369d commit 6bc562a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,13 @@ $(OBJDIR)/empty-array.o: CFLAGS_EXTRA=-Wno-zero-length-array
9696
$(OBJDIR)/assert.o: CFLAGS_EXTRA=-Wno-unused-parameter
9797
$(OBJDIR)/my-assert.o: CFLAGS_EXTRA=-Wno-unused-parameter
9898
$(OBJDIR)/argv-for.o: CFLAGS_EXTRA=-Wno-format-pedantic
99+
ifeq ($(CC), gcc)
99100
$(OBJDIR)/buf-overflow.o: CFLAGS_EXTRA=-Wno-builtin-memcpy-chk-size \
100101
-Wno-sizeof-pointer-memaccess -Wno-stringop-overflow
102+
else
103+
$(OBJDIR)/buf-overflow.o: CFLAGS_EXTRA=-Wno-builtin-memcpy-chk-size \
104+
-Wno-sizeof-pointer-memaccess
105+
endif
101106
$(OBJDIR)/derived-types.o: CFLAGS_EXTRA=-Wno-incompatible-pointer-types
102107
$(OBJDIR)/ptr_plus_plus.o: CFLAGS_EXTRA=-Wno-format-pedantic \
103108
-Wno-unused-value -Wno-format

0 commit comments

Comments
 (0)