Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONFIG: Add external flags to configure output #10378

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

tvegas1
Copy link
Contributor

@tvegas1 tvegas1 commented Dec 16, 2024

What?

Add external flags to configure output, others are already output as part of compiler command line.

$ CFLAGS=-Wextra CXXFLAGS=-Wextra contrib/configure-devel
...
configure:         Build prefix:   /usr
configure:    Configuration dir:   /etc/ucx
configure:   Preprocessor flags:   -DCPU_FLAGS="" -I${abs_top_srcdir}/src -I${abs_top_builddir} -I${abs_top_builddir}/src
configure:           C compiler:   gcc -O3 -g -Wall -Werror -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch -Wno-pointer-sign -Werror-implicit-function-declaration -Wno-format-zero-length -Wnested-externs -Wshadow -Werror=declaration-after-statement
configure:         C++ compiler:   g++ -O3 -g -Wall -Werror -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch
configure:               CFLAGS:   -Wextra
configure:             CPPFLAGS:    -I/usr/include
configure:             CXXFLAGS:   -Wextra
configure:           ASAN check:   no
configure:         Multi-thread:   enabled
...

configure.ac Outdated
@@ -409,6 +409,9 @@ AC_MSG_NOTICE([ Configuration dir: ${ucx_config_dir}])
AC_MSG_NOTICE([ Preprocessor flags: ${BASE_CPPFLAGS}])
AC_MSG_NOTICE([ C compiler: ${CC} ${BASE_CFLAGS}])
AC_MSG_NOTICE([ C++ compiler: ${CXX} ${BASE_CXXFLAGS}])
AC_MSG_NOTICE([ CFLAGS: ${CFLAGS}])
AC_MSG_NOTICE([ CPPFLAGS: ${CPPFLAGS}])
AC_MSG_NOTICE([ CXXFLAGS: ${CXXFLAGS}])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT to unite the printing of BASE_CFLAGS and BASE_CXXFLAGS with the new output of CFLAGS/CPP/CXXFLAGS? to separate the print of compiler executable and the compilation flags

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed below:

configure: =========================================================
configure: UCX build configuration:
configure:         Build prefix:   /usr
configure:    Configuration dir:   /etc/ucx
configure:                   CC:   gcc
configure:                  CXX:   g++
configure:        BASE_CPPFLAGS:   -DCPU_FLAGS="" -I${abs_top_srcdir}/src -I${abs_top_builddir} -I${abs_top_builddir}/src
configure:          BASE_CFLAGS:   -O3 -g -Wall -Werror -fno-omit-frame-pointer -funwind-tables -Wframe-larger-than=8192 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch -Wno-pointer-sign -Werror-implicit-function-declaration -Wno-format-zero-length -Wnested-externs -Wshadow -Werror=declaration-after-statement
configure:        BASE_CXXFLAGS:   -O3 -g -Wall -Werror -fno-omit-frame-pointer -funwind-tables -Wframe-larger-than=8192 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch
configure:             CPPFLAGS:    -I/usr/include
configure:               CFLAGS:
configure:             CXXFLAGS:   -Wall
configure:           ASAN check:   no
configure:         Multi-thread:   enabled

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO unite
CPPFLAGS + BASE_CPPFLAGS
CFLAGS + BASE_CFLAGS
CXXFLAGS + BASE_CXXFLAGS

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pushed, I ordered base_cflags before cflags as they are more likely to be used in this order. tbh I prefer the previous version, in case other flags would be inserted between base_cflags and cflags this does not create false promise.

configure:                   CC:   gcc
configure:                  CXX:   g++
configure:             CPPFLAGS:   -DCPU_FLAGS="" -I${abs_top_srcdir}/src -I${abs_top_builddir} -I${abs_top_builddir}/src -Wall -I/usr/include
configure:               CFLAGS:   -O3 -g -Wall -Werror -fno-omit-frame-pointer -funwind-tables -Wframe-larger-than=8192 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch -Wno-pointer-sign -Werror-implicit-function-declaration -Wno-format-zero-length -Wnested-externs -Wshadow -Werror=declaration-after-statement -Wall
configure:             CXXFLAGS:   -O3 -g -Wall -Werror -fno-omit-frame-pointer -funwind-tables -Wframe-larger-than=8192 -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-label -Wno-long-long -Wno-endif-labels -Wno-sign-compare -Wno-multichar -Wno-deprecated-declarations -Winvalid-pch -Wall
configure:           ASAN check:   no

Copy link
Contributor

@yosefe yosefe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! pls squash

@rakhmets rakhmets merged commit e51cd2a into openucx:master Dec 30, 2024
146 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants