Skip to content

Commit

Permalink
[meta] Simplify compilation for saimetadata.c (sonic-net#887)
Browse files Browse the repository at this point in the history
All those flags are just warnings, and were already checked in SAI repo during PR validation.
  • Loading branch information
kcudnik authored Aug 10, 2021
1 parent d18b7ee commit 7bd43e2
Showing 1 changed file with 2 additions and 42 deletions.
44 changes: 2 additions & 42 deletions meta/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,46 +10,6 @@ endif

lib_LTLIBRARIES = libsaimeta.la libsaimetadata.la

WARN = \
-ansi \
-Wall \
-Wcast-align \
-Wcast-qual \
-Wconversion \
-Wdisabled-optimization \
-Werror \
-Wextra \
-Wextra \
-Wfloat-equal \
-Wformat=2 \
-Wformat-nonliteral \
-Wformat-security \
-Wformat-y2k \
-Wimport \
-Winit-self \
-Winline \
-Winvalid-pch \
-Wmissing-field-initializers \
-Wmissing-format-attribute \
-Wmissing-include-dirs \
-Wmissing-noreturn \
-Wno-aggregate-return \
-Wno-padded \
-Wno-switch-enum \
-Wno-unused-parameter \
-Wpacked \
-Wpointer-arith \
-Wredundant-decls \
-Wshadow \
-Wstack-protector \
-Wstrict-aliasing=3 \
-Wswitch \
-Wswitch-default \
-Wunreachable-code \
-Wunused \
-Wvariadic-macros \
-Wwrite-strings

# we are not adding CPPFLAGS since they are added
# automatic to each C preprocessor, and currently
# we add -std=c++11 flag to CXXFLAGS_COMMON which
Expand All @@ -65,12 +25,12 @@ libsaimeta_la_SOURCES = \
$(top_srcdir)/SAI/meta/saiserialize.c

libsaimeta_la_CPPFLAGS = $(CODE_COVERAGE_CPPFLAGS)
libsaimeta_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) $(WARN) $(CODE_COVERAGE_CFLAGS)
libsaimeta_la_CFLAGS = $(DBGFLAGS) $(AM_CFLAGS) -ansi $(CODE_COVERAGE_CFLAGS)

$(top_srcdir)/SAI/meta/saimetadata.h $(top_srcdir)/SAI/meta/saimetadata.c: saimeta-gen

saimeta-gen:
make -C $(top_srcdir)/SAI/meta
make -C $(top_srcdir)/SAI/meta saimetadata.c saimetadata.h

clean-local:
make -C $(top_srcdir)/SAI/meta clean
Expand Down

0 comments on commit 7bd43e2

Please sign in to comment.