From e6a2206f2f3de58c23cafcad5a1cd573e63e7720 Mon Sep 17 00:00:00 2001 From: Jonathan Rajotte Date: Mon, 23 Jan 2017 18:10:26 -0500 Subject: [PATCH] jjb: Do not export CFLAGS, CPPFLAGS and LDFLAGS Pass CFLAGS, CPPFLAGS and LDFLAGS to configure. Signed-off-by: Jonathan Rajotte --- scripts/lttng-tools/build.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index 2c436ad..ad695d2 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -134,8 +134,8 @@ macosx) RUN_TESTS="no" export PATH="/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" - export CFLAGS="-I/opt/local/include" - export LDFLAGS="-L/opt/local/lib" + CFLAGS="-I/opt/local/include" + LDFLAGS="-L/opt/local/lib" ;; *) @@ -173,14 +173,14 @@ PACKAGE_VERSION=$(echo "$PACKAGE_VERSION"| sed 's/\-pre$//') # Export build flags case "$conf" in no-ust) - export CPPFLAGS="-I$URCU_INCS" - export LDFLAGS="-L$URCU_LIBS" + CPPFLAGS="${CPPFLAGS:-} -I$URCU_INCS" + LDFLAGS="${LDFLAGS:-} -L$URCU_LIBS" export LD_LIBRARY_PATH="$URCU_LIBS:$BABEL_LIBS:${LD_LIBRARY_PATH:-}" ;; *) - export CPPFLAGS="-I$URCU_INCS -I$UST_INCS" - export LDFLAGS="-L$URCU_LIBS -L$UST_LIBS" + CPPFLAGS="${CPPFLAGS:-} -I$URCU_INCS -I$UST_INCS" + LDFLAGS="${LDFLAGS:-} -L$URCU_LIBS -L$UST_LIBS" export LD_LIBRARY_PATH="$URCU_LIBS:$UST_LIBS:$BABEL_LIBS:${LD_LIBRARY_PATH:-}" ;; esac @@ -249,14 +249,14 @@ case "$build" in BUILD_PATH=$WORKSPACE/oot mkdir -p "$BUILD_PATH" cd "$BUILD_PATH" - MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" "$SRCDIR/configure" --prefix="$PREFIX" $CONF_OPTS ;; dist) echo "Distribution tarball in-tree build" # Initial configure and generate tarball - MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$SRCDIR/configure" $CONF_OPTS --enable-build-man-pages + MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" "$SRCDIR/configure" $CONF_OPTS --enable-build-man-pages $MAKE dist BUILD_PATH="$(mktemp -d)" @@ -267,7 +267,7 @@ case "$build" in $TAR xvf ./*.tar.* --strip 1 # Build in extracted source tree - MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS ;; oot-dist) @@ -276,7 +276,7 @@ case "$build" in cd "$BUILD_PATH" # Initial configure and generate tarball - MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$SRCDIR/configure" $CONF_OPTS --enable-build-man-pages + MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" "$SRCDIR/configure" $CONF_OPTS --enable-build-man-pages $MAKE dist NEWSRC_PATH="$(mktemp -d)" @@ -290,12 +290,12 @@ case "$build" in cd "$BUILD_PATH" # Build oot from extracted sources - MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$NEWSRC_PATH/configure" --prefix="$PREFIX" $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" "$NEWSRC_PATH/configure" --prefix="$PREFIX" $CONF_OPTS ;; *) echo "Standard tree build" - MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS + MAKE=$MAKE BISON="$BISON" YACC="$YACC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS" "$BUILD_PATH/configure" --prefix="$PREFIX" $CONF_OPTS ;; esac -- 2.34.1