diff mbox series

[v2,3/4] build.sh: Respect user defined CFLAGS and LDFLAGS

Message ID 20190802150445.10984-4-pvorel@suse.cz
State Superseded
Delegated to: Petr Vorel
Headers show
Series Move -Werror-implicit-function-declaration to | expand

Commit Message

Petr Vorel Aug. 2, 2019, 3:04 p.m. UTC
Therefore it was needed to export them and not pass as a parameter.

It will be used for travis settings in next commit, but also can be
handy for using build.sh in local development.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 build.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/build.sh b/build.sh
index 634ef51b5..3da2adf55 100755
--- a/build.sh
+++ b/build.sh
@@ -21,7 +21,8 @@  CC=gcc
 build_32()
 {
 	echo "===== 32-bit ${1}-tree build into $PREFIX ====="
-	build $1 CFLAGS="-m32" LDFLAGS="-m32"
+	export CFLAGS="-m32 $CFLAGS" LDFLAGS="-m32 $LDFLAGS"
+	build $1
 }
 
 build_native()
@@ -63,7 +64,7 @@  build_out_tree()
 
 	mkdir -p $build
 	cd $build
-	run_configure $tree/configure $CONFIGURE_OPTS_OUT_TREE CC="$CC" $@
+	run_configure $tree/configure $CONFIGURE_OPTS_OUT_TREE CC="$CC" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS" $@
 
 	echo "=== build ==="
 	make $make_opts