[riot-notifications] [RIOT-OS/RIOT] makefiles: do not remove defines from CFLAGS (#12262)

Gaëtan Harter notifications at github.com
Fri Sep 27 17:49:29 CEST 2019


I currently do not correctly understand how both packages are building.

If I have this:

``` diff
diff --git a/dist/tools/cmake/generate-xcompile-toolchain.sh b/dist/tools/cmake/generate-xcompile-toolchain.sh
index 55f4af8c4..705f34578 100755
--- a/dist/tools/cmake/generate-xcompile-toolchain.sh
+++ b/dist/tools/cmake/generate-xcompile-toolchain.sh
@@ -8,7 +8,7 @@ echo "SET(CMAKE_LINKER \"${LINK}\" CACHE STRING \"\")"
 echo "SET(CMAKE_RANLIB \"${RANLIB}\" CACHE STRING \"\")"
 # disable linker test
 echo "SET(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)"
-echo "SET(CMAKE_C_FLAGS \"${CFLAGS}\" CACHE STRING \"\")"
+printf "SET(CMAKE_C_FLAGS '%s' CACHE STRING "'"")\n' "${CFLAGS}"
 echo "SET(CMAKE_EXE_LINKER_FLAGS \"${LFLAGS}\" CACHE STRING \"\")"
 # search for programs in the build host directories
 echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)"
```
it does not complain about the parentheses.

```diff
diff --git a/pkg/relic/Makefile b/pkg/relic/Makefile
index 7e2466c9d..cb5b72ded 100644
--- a/pkg/relic/Makefile
+++ b/pkg/relic/Makefile
@@ -18,7 +18,7 @@ all: $(PKG_BUILDDIR)/Makefile
 
 $(PKG_BUILDDIR)/Makefile: $(TOOLCHAIN_FILE)
        cd $(PKG_BUILDDIR) && \
-       COMP="$(filter-out -Werror -Werror=old-style-definition -Werror=strict-prototypes -std=gnu99, $(CFLAGS) ) " \
+       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) .
 
```

Relic does not fail about having two different values for the macros.

But I do not understand then why `relic` must get the `CFLAGS` from both this file, and the `COMP`.

I do not have `ccn-lite` yet.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12262#issuecomment-535995325
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190927/da3059bf/attachment.htm>


More information about the notifications mailing list