1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

pkg/relic: pass COMP through environment

export COMP by using the environment insteal of through the shell to
prevnet issues with `\"` being defined when keeping macros in CFLAGS.

Another solution was to use COMP='...' but could there could still have
issues with single quotes in CFLAGS.
This commit is contained in:
cladmi 2019-09-27 18:07:35 +02:00
parent e42b4cc75f
commit da59fb0eda
No known key found for this signature in database
GPG Key ID: 76DF6BCF1B1F883B

View File

@ -16,9 +16,13 @@ all: $(PKG_BUILDDIR)/Makefile
$(MAKE) -C $(PKG_BUILDDIR) && \
cp $(PKG_BUILDDIR)/lib/librelic_s.a $(BINDIR)/$(PKG_NAME).a
# Pass 'COMP' with a target specific export to not have issues with the shell
# escaping evaluation.
COMP = $(filter-out -Werror -Werror=old-style-definition -Werror=strict-prototypes -std=gnu99,$(CFLAGS))
$(PKG_BUILDDIR)/Makefile: export COMP ?=
$(PKG_BUILDDIR)/Makefile: $(TOOLCHAIN_FILE)
cd $(PKG_BUILDDIR) && \
COMP="$(filter-out -Werror -Werror=old-style-definition -Werror=strict-prototypes -std=gnu99, $(CFLAGS) ) " \
cmake -DCMAKE_TOOLCHAIN_FILE=$(TOOLCHAIN_FILE) \
-DCHECK=off -DTESTS=0 -DBENCH=0 -DSHLIB=off -Wno-dev $(RELIC_CONFIG_FLAGS) .