diff options
author | Konstantin Pavlov <thresh@nginx.com> | 2024-02-22 14:12:51 -0800 |
---|---|---|
committer | Konstantin Pavlov <pavlov.konstantin@gmail.com> | 2024-02-22 18:46:15 -0800 |
commit | faa7e792428265a7c72ff0c692f31c04932d7dc0 (patch) | |
tree | 843d4641fcd40e4e45cd16d198e29d58fc56f938 /pkg | |
parent | e2cab032341f4a41d02107ac742cc44a04205038 (diff) | |
download | unit-faa7e792428265a7c72ff0c692f31c04932d7dc0.tar.gz unit-faa7e792428265a7c72ff0c692f31c04932d7dc0.tar.bz2 |
Packages: Pass CFLAGS to compile wasm modules on all packaging targets
This extends the approach used for debian-based packages in 3f805bc64e28
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 d54af163c46b).
The rpm part was overlooked in 7a6405566c0, since testing was not done
on the platforms where problem manifested itself, notably Amazon Linux
2023 and Fedora 38+.
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/deb/Makefile.wasm | 4 | ||||
-rw-r--r-- | pkg/rpm/Makefile.wasm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/pkg/deb/Makefile.wasm b/pkg/deb/Makefile.wasm index 9e408fda..8f3fdc67 100644 --- a/pkg/deb/Makefile.wasm +++ b/pkg/deb/Makefile.wasm @@ -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= diff --git a/pkg/rpm/Makefile.wasm b/pkg/rpm/Makefile.wasm index fbf64d11..cb2ad35a 100644 --- a/pkg/rpm/Makefile.wasm +++ b/pkg/rpm/Makefile.wasm @@ -7,7 +7,7 @@ MODULE_VERSION_wasm= $(VERSION) MODULE_RELEASE_wasm= 1 MODULE_CONFARGS_wasm= wasm --include-path=\`pwd\`/pkg/contrib/wasmtime/crates/c-api/include --lib-path=\`pwd\`/pkg/contrib/wasmtime/target/release \&\& ./configure wasm-wasi-component -MODULE_MAKEARGS_wasm= wasm wasm-wasi-component +MODULE_MAKEARGS_wasm= wasm wasm-wasi-component CFLAGS=\"\$$(grep ^CFLAGS build/Makefile | cut -d' ' -f 3-) -Wno-missing-prototypes\" MODULE_INSTARGS_wasm= wasm-install wasm-wasi-component-install MODULE_SOURCES_wasm= |