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

Configure/compile: cflags/cxxflags and compiler invocation #10367

Closed
tonycurtis opened this issue Dec 11, 2024 · 9 comments
Closed

Configure/compile: cflags/cxxflags and compiler invocation #10367

tonycurtis opened this issue Dec 11, 2024 · 9 comments
Labels

Comments

@tonycurtis
Copy link
Contributor

Describe the bug

I was building UCX with different compiler options (.e.g. ARM SVE), and was confused/frustrated about why my CFLAGS/CXXFLAGS settings were not reported in the configure output at the end. Suggest that the output

configure:           C compiler:   nvc -O3 -g -Wall -Werror -fno-omit-frame-pointer --display_error_number --diag_suppress 1 --diag_suppress 68 --diag_suppress 111 --diag_suppress 167 --diag_suppress 181 --diag_suppress 188 --diag_suppress 381 --diag_suppress 1215 --diag_suppress 1626 --diag_suppress 1901 --diag_suppress 1902 -Wno-unused-parameter -Wno-long-long -Wno-sign-compare -Wno-deprecated-declarations -Wnested-externs -Wshadow -Werror=declaration-after-statement

etc. should be split into the compiler name (gcc, nvc, clang and so on) and what the CFLAGS etc. are

I see the extra CFLAGS from the environment variable only when I compile.

@tonycurtis tonycurtis added the Bug label Dec 11, 2024
@tvegas1
Copy link
Contributor

tvegas1 commented Dec 12, 2024

Seems information found in config.log addresses your concern?

## ----------------- ##
## Output variables. ##
## ----------------- ##
...
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'
BASE_CPPFLAGS='-DCPU_FLAGS="" -I${abs_top_srcdir}/src -I${abs_top_builddir} -I${abs_top_builddir}/src'
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'
BFD_CPPFLAGS=''
BFD_DEPS='-lz -ldl '
BFD_LDFLAGS=''
BFD_LIBS='-lbfd -ldl -lz '
CC='gcc'
CCAS='gcc'
CCASDEPMODE='depmode=gcc3'
CCASFLAGS=''
CCDEPMODE='depmode=gcc3'
CFLAGS=''
CFLAGS_NO_DEPRECATED='-Wno-deprecated-declarations'
CFLAGS_PEDANTIC=' -pedantic'
CPP='gcc -E'
CPPFLAGS=' -I/usr/include
...

@tonycurtis
Copy link
Contributor Author

Yes, but I thought it might be nicer to include the extra flags in the summary output

@tvegas1
Copy link
Contributor

tvegas1 commented Dec 13, 2024

I am assuming we wanted to keep console output synthetic, @yosefe wdyt?

@yosefe
Copy link
Contributor

yosefe commented Dec 13, 2024

I guess we can print the extra flags in a separate line

@tvegas1
Copy link
Contributor

tvegas1 commented Dec 13, 2024

@tonycurtis, can you please mention the list of flags you would like to see in configure output?

@tonycurtis
Copy link
Contributor Author

tonycurtis commented Dec 13, 2024

I was thinking it would be nice to see the same command-line that shows up in make V=1.

Although I appreciate this could vary between certain modules?

@tvegas1
Copy link
Contributor

tvegas1 commented Dec 13, 2024

I was thinking it would be nice to see the same command-line that shows up in make V=1.

Although I appreciate this could vary between certain modules?

Yes i think it could depend. What about we try to add like below?

CC=gcc
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'
BASE_CPPFLAGS='-DCPU_FLAGS="" -I${abs_top_srcdir}/src -I${abs_top_builddir} -I${abs_top_builddir}/src'
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'
CFLAGS=''

@tonycurtis
Copy link
Contributor Author

Looks ok!

@tvegas1
Copy link
Contributor

tvegas1 commented Dec 16, 2024

Can you please check #10378?

@tvegas1 tvegas1 closed this as completed Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants