-
Notifications
You must be signed in to change notification settings - Fork 480
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
gcc -Wall -Werror: libelf: [ OFF ] even when libelf-devel is installed #1869
Comments
Ok, I think we can add "unused" attribute to those variables to prevent compiler warnings. |
Ok, I think we should save the output of compiler during the dependency check. And for the libelf case specifically, it can simply remove the ehdr variable as it's not needed by the program. |
Hi, |
Yep, please go ahead! |
Hi, I looked into this issue a couple of weeks back and now I have a small question regarding the checks of |
The |
Maybe I wasn't clear; I thought the presence of |
Ok, I think you can put the code that uses gelf functions in the |
@namhyung Hello, I'm trying to solve the above issue, and I'd like to suggest the following : Instead of #include <gelf.h>
#include <libelf.h>
int main(void)
{
Elf *elf;
elf_version(EV_CURRENT);
/* check that the gelf function */
elf = elf_begin(0, ELF_C_READ, 0);
gelf_checksum(elf);
elf_end(elf);
return 0;
} |
Looks good, the only nitpick is the third argument of |
Even though 'libelf-devel' is installed, 'libelf' is displayed as [OFF] rather than [ON] when running ./configure. Fixed : namhyung#1869 (issue : gcc -Wall -Werror: libelf: [ OFF ] even when libelf-devel is installed) Signed-off-by: Sojin Jang <[email protected]>
Even though 'libelf-devel' is installed, 'libelf' is displayed as [OFF] rather than [ON] when running ./configure. Fixed : namhyung#1869 (issue : gcc -Wall -Werror: libelf: [ OFF ] even when libelf-devel is installed) Signed-off-by: Sojin Jang <[email protected]>
Even though 'libelf-devel' is installed, 'libelf' is displayed as [OFF] rather than [ON] when running ./configure. Fixed : namhyung#1869 (issue : gcc -Wall -Werror: libelf: [ OFF ] even when libelf-devel is installed) Signed-off-by: Sojin Jang <[email protected]>
Even though 'libelf-devel' is installed, 'libelf' is displayed as [OFF] rather than [ON] when running ./configure. Fixed : namhyung#1869 Signed-off-by: SoJin Jang <[email protected]>
JFYI:
In ALT we compiling with
CFLAGS='-pipe -frecord-gcc-switches -Wall -g -O2 '
by default (but no-Werror
). With this libelf tests always negative even when libelf-devel is installed.With this patch
we see
In gcc 13.2.1
-Wunused-variable
is included in-Wall
:I easily (except the time to find this) workaround this by adding
-Wno-error=unused-variable
toCFLAGS
.The text was updated successfully, but these errors were encountered: