Packages: Pass CFLAGS to compile wasm modules on all packaging targets

This extends the approach used for debian-based packages in 3f805bc64e
to rpm as well.  Notable change for both deb and rpm packaging is to use
CFLAGS as defined in the build/Makefile, and not pass them from the
environment which might not be there (as is the case for rpm).

While at it, stop passing CFLAGS in the install phase, as it should no
longer invoke builds (see d54af163c4).

The rpm part was overlooked in 7a6405566c, since testing was not done
on the platforms where problem manifested itself, notably Amazon Linux
2023 and Fedora 38+.
This commit is contained in:
Konstantin Pavlov
2024-02-22 14:12:51 -08:00
committed by Konstantin Pavlov
parent e2cab03234
commit faa7e79242
2 changed files with 3 additions and 3 deletions

View File

@@ -7,8 +7,8 @@ MODULE_VERSION_wasm= $(VERSION)
MODULE_RELEASE_wasm= 1
MODULE_CONFARGS_wasm= wasm --include-path=\$$(CURDIR)/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\$$(CURDIR)/pkg/contrib/wasmtime/target/release \&\& ./configure wasm-wasi-component
MODULE_MAKEARGS_wasm= wasm wasm-wasi-component CFLAGS='\$$(CFLAGS) -Wno-missing-prototypes'
MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install CFLAGS='\$$(CFLAGS) -Wno-missing-prototypes'
MODULE_MAKEARGS_wasm= wasm wasm-wasi-component CFLAGS=\"\$$(shell grep ^CFLAGS \$$(BUILDDIR_\$$*)/build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\"
MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install
MODULE_SOURCES_wasm=